SUSE11 安装mysql

SUSE11

检测系统是否安装MySQL

#rpm -qa | grep -i mysql
若已安装过,会出现:
MySQL-server-5.0.22-0.i386
MySQL-client-5.0.22-0.i386
那么输入以下命令删除它:
#rpm -ev MySQL-server-5.0.22-0.i386
# rpm -ev MySQL-client-5.0.22-0.i386
注意:若删除的时候,出现删除不成功,出现依赖的包,前提必须删除依赖项。rpm -ev dovecot-1.0.7-7.el5.x86_64

在suse11.2-64上先安装一个本地库: 用国内镜像,注意mysql 5.6.22 由于版本更新,所以可以直接访问http://mirrors.sohu.com/mysql/MySQL-5.6/ 查看新的版本,否则wget 下载不到需要的rpm文件.

wget -c  http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-server-5.6.22-1.sles11.x86_64.rpm     (for suse11-64版本)

wget -c  http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-client-5.6.22-1.sles11.x86_64.rpm

wget -c  http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-devel-5.6.22-1.sles11.x86_64.rpm

下载完成后开始安装:

rpm -ivh MySQL-server-5.6.22-1.sles11.x86_64.rpm MySQL-client-5.6.22-1.sles11.x86_64.rpm MySQL-devel-5.6.22-1.sles11.x86_64.rpm

Preparing... ########################################### [100%] 

1:MySQL-client ########################################### [ 50%] 
2:MySQL-server ########################################### [100%] 
warning: user mysql does not exist - using root 
warning: group mysql does not exist - using root 
insserv: Service network is missed in the runlevels 4 to use service mysql 
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off 
2014-12-22 16:36:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 
2014-12-22 16:36:57 20644 [Note] InnoDB: Using atomics to ref count buffer pool pages 
2014-12-22 16:36:57 20644 [Note] InnoDB: The InnoDB memory heap is disabled 
2014-12-22 16:36:57 20644 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 
2014-12-22 16:36:57 20644 [Note] InnoDB: Memory barrier is not used 
2014-12-22 16:36:57 20644 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2014-12-22 16:36:57 20644 [Note] InnoDB: Using Linux native AIO 
2014-12-22 16:36:57 20644 [Note] InnoDB: Using CPU crc32 instructions 
2014-12-22 16:36:57 20644 [Note] InnoDB: Initializing buffer pool, size = 128.0M 
2014-12-22 16:36:57 20644 [Note] InnoDB: Completed initialization of buffer pool 
2014-12-22 16:36:57 20644 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 
2014-12-22 16:36:57 20644 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 
2014-12-22 16:36:57 20644 [Note] InnoDB: Database physically writes the file full: wait... 
2014-12-22 16:36:57 20644 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 
2014-12-22 16:36:57 20644 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 
2014-12-22 16:36:58 20644 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 
2014-12-22 16:36:58 20644 [Warning] InnoDB: New log files created, LSN=45781 
2014-12-22 16:36:58 20644 [Note] InnoDB: Doublewrite buffer not found: creating new 
2014-12-22 16:36:58 20644 [Note] InnoDB: Doublewrite buffer created 
2014-12-22 16:36:58 20644 [Note] InnoDB: 128 rollback segment(s) are active. 
2014-12-22 16:36:58 20644 [Warning] InnoDB: Creating foreign key constraint system tables. 
2014-12-22 16:36:58 20644 [Note] InnoDB: Foreign key constraint system tables created 
2014-12-22 16:36:58 20644 [Note] InnoDB: Creating tablespace and datafile system tables. 
2014-12-22 16:36:58 20644 [Note] InnoDB: Tablespace and datafile system tables created. 
2014-12-22 16:36:58 20644 [Note] InnoDB: Waiting for purge t start 
2014-12-22 16:36:58 20644 [Note] InnoDB: 5.6.22 started; log sequence number 0 
A random root password has been set. You will find it in ‘/root/.mysql_secret‘. 
2014-12-22 16:36:58 20644 [Note] Binlog end 
2014-12-22 16:36:58 20644 [Note] InnoDB: FTS optimize thread exiting. 
2014-12-22 16:36:58 20644 [Note] InnoDB: Starting shutdown... 
2014-12-22 16:37:00 20644 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2014-12-22 16:37:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 
2014-12-22 16:37:00 20666 [Note] InnoDB: Using atomics to ref count buffer pool pages 
2014-12-22 16:37:00 20666 [Note] InnoDB: The InnoDB memory heap is disabled 
2014-12-22 16:37:00 20666 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 
2014-12-22 16:37:00 20666 [Note] InnoDB: Memory barrier is not used 
2014-12-22 16:37:00 20666 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2014-12-22 16:37:00 20666 [Note] InnoDB: Using Linux native AIO 
2014-12-22 16:37:00 20666 [Note] InnoDB: Using CPU crc32 instructions 
2014-12-22 16:37:00 20666 [Note] InnoDB: Initializing buffer pool, size = 128.0M 
2014-12-22 16:37:00 20666 [Note] InnoDB: Completed initialization of buffer pool 
2014-12-22 16:37:00 20666 [Note] InnoDB: Highest supported file format is Barracuda. 
2014-12-22 16:37:00 20666 [Note] InnoDB: 128 rollback segment(s) are active. 
2014-12-22 16:37:00 20666 [Note] InnoDB: Waiting for purge to start 
2014-12-22 16:37:00 20666 [Note] InnoDB: 5.6.22 started; log sequence number 1625977 
2014-12-22 16:37:00 20666 [Note] Binlog end 
2014-12-22 16:37:00 20666 [Note] InnoDB: FTS optimize thread exiting. 
2014-12-22 16:37:00 20666 [Note] InnoDB: Starting shutdown... 
2014-12-22 16:37:02 20666 [Note] InnoDB: Shutdown completed; log sequence number 1625987

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER ! 
You will find that password in ‘/root/.mysql_secret‘.

You must change that password on your first connect, 
no other statement but ‘SET PASSWORD‘ will be accepted. 
See the manual for the semantics of the ‘password expired‘ flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test database. 
This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/my.cnf and 
will be used by default by the server when you start it. 
You may edit this file to change server settings

linux:~ # more .mysql_secret

# The random password set for the root user at Mon Dec 22 16:36:58 2014 (local time): lXNgZ2zmMi1MsIht

linux:/usr # mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 10

Server version: 5.6.22

mysql>

重新设置密码为 123456

mysql> SET PASSWORD = PASSWORD(‘123456‘);    #设置密码为123456

mysql> exit

编辑 my.cnf 修改字符集:

[client]

#password        = 123456

port            = 3306

default-character-set=utf8

[mysqld]

port            = 3306

character_set_server=utf8

character_set_client=utf8

collation-server=utf8_general_ci

#(注意linux下mysql安装完后是默认:表名区分大小写,列名不区分大小写; 0:区分大小写,1:不区分大小写)

lower_case_table_names=1

#(设置最大连接数,默认为 151,MySQL服务器允许的最大连接数16384; )

max_connections=1000

[mysql]

default-character-set = utf8

重新启动  service mysql restart ,注意看是否错误.

时间: 2024-10-10 14:54:21

SUSE11 安装mysql的相关文章

centos7下使用yum安装mysql

CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm 安装这个

centos6.8 yum安装mysql 5.6

一.检查系统是否安装其他版本的MYSQL数据 yum list installed | grep mysql yum -y remove mysql-libs.x86_64 二.安装及配置 wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm rpm -ivh mysql-community-release-el6-5.noarch.rpm yum repolist all | grep mysql 安装MYSQL

centos7 用yum安装mysql(转)

CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server 成功安装之后重启mysql服务 # service mysqld res

Ubuntu安装MySQL

看着别人说千遍万遍,不如自己实际操作一遍,以下是本人第一次安装MySQL之后总结出来的,走了许多的坑,欢迎评论 一.Ubuntu服务器安装MySQL1.升级apt-get:apt-get update 更新软件源中的所有软件列表 2.查看MySQL源:apt-cache search mysql-server 3.安装mysql:$sudo apt-get install mysql-serverPS:这步之后需要输入用户名和密码,要记住$sudo apt-get install libmysq

安装mysql时,提示This application requires .NET framework 4.0问题

Question:双击MySQL的安装文件, 弹框提示, Answer:安装微软的 .NET Framework 4或更新的版本,下载地址:https://www.microsoft.com/zh-cn/Search/result.aspx?q=.net+framework&x=0&y=0 安装完成后安装MySQL即可.

自动安装MySQL脚本

在Linux 上安装MySQL单实例SHELL脚本 在CentOS 6.5环境测试通过 #!/bin/bash user=mysql group=mysql port=3306 basedir=/usr/local/mysql datadir=/data/mysql/mysql_${port}/data sourcefile=$1 mysqlprofile=/etc/my.cnf logfile=/tmp/mysqlinstall.log nowtime=`date '+%Y-%m-%d %H:

CentOS 7.2 yum方式安装MySQL 5.7

CentOS 7之后的版本yum的默认源中使用MariaDB替代原先MySQL,因此安装方式较为以往有一些改变: 下载mysql的源 wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm 安装yum库 yum localinstall -y mysql57-community-release-el7-7.noarch.rpm 安装MySQL yum install -y mysql-community-s

安装mysql

一:安装mysql 1.在web服务器上安装mysql: yum -y remove mysql mysql-server ##卸载mysql的rpm包 mount /dev/cdrom /mnt yum -y install ncurses-* lftp ftp.linuxfan.cn ##下载mysql和cmake lftp ftp.linuxfan.cn:/tools> get cmake-2.8.6.tar.gz mysql-5.5.22.tar.gz 2.解压cmake,安装基础环境

CentOS6.5下安装MySQL

方法有点笨,但是,没有找到好一点的办法,就这样先装着,看朋友们是否也有需要,记录一下 CentOS 下安装MySQL5.7的时候出现各种问题,各种报错,试过无数办法,今天终于安装上去,特此记录一下. (1) 首先,下载一个wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm安装最新的MySQL的yum源,并安装上去 (2) 由于yum源是下载最新的安装包,所以,当你下载安装好yum源之后,就可以进行安装最新的MySQL了,