CentOS6.四将MySQL伍.一进级至5.5.3陆

此报错是由/etc/my.cnf配置文件下的[mysqld]设置字符集引起的,化解方法:将default-character-set=utf八改为 character_set_server=utf8

CentOS6.4将MySQL5.1升级至5.5.36,centos6.4mysql5.1

一.为了安全之间,首先须求备份原有数据

2.卸载原有MySQL,先结束原有的MySQL服务,再搜索 find / -name mysql

[[email protected] /]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql

并移除服务

[[email protected] /]# rm -rf /var/lib/mysql
[[email protected] /]# rm -rf /var/lib/mysql
[[email protected] /]# rm -rf /usr/lib64/mysql

3.安装cmake

[[email protected] download]# wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
[[email protected] download]# tarx zvfc cmake-2.8.12.2.tar.gz
[[email protected] download]# cd cmake-2.8.12.2
[[email protected] cmake-2.8.12.2]# ./configure
[[email protected] cmake-2.8.12.2]# make && make install

四.下载安装MySQL伍.5.3六

[[email protected] download]# wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.36.tar.gz
[[email protected] download]# tar xzvf mysql-5.5.36.tar.gz
[[email protected] download]# cd mysql-5.5.36
[[email protected] mysql-5.5.36]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/home/mysql
[[email protected] mysql-5.5.36]# make && make install

 在cmake的历程中出错了,提醒Could NOT find Curses (missing: 
CU奥迪Q五SES_LIBRARY CURSES_INCLUDE_PATH)

实施以下代码就能够了,实行好之后一连cmake,然后再make && make install

[[email protected] mysql-5.5.36]# rm CMakeCache.txt
[[email protected] mysql-5.5.36]# yum install ncurses-devel

5.接下来须要把此前备份下来的my.cnf文件,复制至/etc/my.cnf
MySQL会读取/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf
/.my.cnf。左侧的公文优先级是参天的

6.安插好之后,大家就运转mysql,发现成三个主题素材运行MySQL提醒:The server
quit without updating PID file(…)退步
翻看my.cnf文件设置的日志文件地点/var/log/mysqld.log,错误提示如下

170715 12:31:36 mysqld_safe mysqld from pid file /var/lib/mysql/qxyw.pid ended
170715 12:57:48 mysqld_safe Starting mysqld daemon with databases from /home/mysql
170715 12:57:48 InnoDB: The InnoDB memory heap is disabled
170715 12:57:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170715 12:57:48 InnoDB: Compressed tables use zlib 1.2.3
170715 12:57:48 InnoDB: Initializing buffer pool, size = 128.0M
170715 12:57:48 InnoDB: Completed initialization of buffer pool
170715 12:57:48 InnoDB: highest supported file format is Barracuda.
170715 12:57:48  InnoDB: Waiting for the background threads to start
170715 12:57:49 InnoDB: 5.5.36 started; log sequence number 2645823
170715 12:57:49 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'default-character-set=utf8'
170715 12:57:49 [ERROR] Aborting

此报错是由/etc/my.cnf配置文件下的[mysqld]设置字符集引起的,化解办法:将default-character-set=utf八改为 character_set_server=utf8

柒.经过mysql -u root
-p命令连接mysql。(大家事先有安装过mysql,数据库文件还在,所以不必要再增添用户设置权限了)
出现了错误新闻:E途乐ROR 2001 (HY000): Can’t connect to local MySQL server
through socket ‘/tmp/mysql.sock’

阴差阳错原因是我们mysql.sock文件在/usr/lib/mysql/文件夹下
能够尝尝通过上面发号施令连接,并查阅mysql版本

[[email protected] var]# mysql -u root -p -S /usr/lib/mysql/mysql.sock

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.36    |
+-----------+
1 row in set (0.00 sec)

 

http://www.bkjia.com/Mysql/1218850.htmlwww.bkjia.comtruehttp://www.bkjia.com/Mysql/1218850.htmlTechArticleCentOS6.4将MySQL5.1升级至5.5.36,centos6.4mysql5.1
1.为了安全之间,首先需求备份原有数据
二.卸载原有MySQL,先截止原有的MySQL服务,再找找 find /…

[root@qxyw /]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
[root@qxyw download]# wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
[root@qxyw download]# tar -xzvf cmake-2.8.12.2.tar.gz
[root@qxyw download]# cd cmake-2.8.12.2
[root@qxyw cmake-2.8.12.2]# ./configure
[root@qxyw cmake-2.8.12.2]# make && make install

 在cmake的进程中失误了,提示Could NOT find
Curses (missing:  CUKugaSES_LIBRARY CURSES_INCLUDE_PATH)

[root@qxyw var]# mysql -u root -p -S /usr/lib/mysql/mysql.sock

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.36    |
+-----------+
1 row in set (0.00 sec)

5.接下来须求把后面备份下来的my.cnf文件,复制至/etc/my.cnf
MySQL会读取/etc/my.cnf /etc/mysql/my.cnf
/usr/local/mysql/etc/my.cnf /.my.cnf。左侧的公文优先级是最高的

1.为了安全之间,首先必要备份原有数据

出错原因是大家mysql.sock文件在/usr/lib/mysql/文件夹下
能够尝尝通过下边发号施令连接,并查阅mysql版本

7.因而mysql -u root
-p命令连接mysql。(大家事先有安装过mysql,数据库文件还在,所以不须要再增添用户设置权限了)
出现了错误音讯:E福特ExplorerROCR-V 2004 (HY000): Can’t
connect to local MySQL server through socket ‘/tmp/mysql.sock’

170715 12:31:36 mysqld_safe mysqld from pid file /var/lib/mysql/qxyw.pid ended
170715 12:57:48 mysqld_safe Starting mysqld daemon with databases from /home/mysql
170715 12:57:48 InnoDB: The InnoDB memory heap is disabled
170715 12:57:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170715 12:57:48 InnoDB: Compressed tables use zlib 1.2.3
170715 12:57:48 InnoDB: Initializing buffer pool, size = 128.0M
170715 12:57:48 InnoDB: Completed initialization of buffer pool
170715 12:57:48 InnoDB: highest supported file format is Barracuda.
170715 12:57:48  InnoDB: Waiting for the background threads to start
170715 12:57:49 InnoDB: 5.5.36 started; log sequence number 2645823
170715 12:57:49 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'default-character-set=utf8'
170715 12:57:49 [ERROR] Aborting

四.下载安装MySQL五.5.36

[root@localhost mysql-5.5.36]# rm CMakeCache.txt
[root@localhost mysql-5.5.36]# yum install ncurses-devel
[root@qxyw download]# wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.36.tar.gz
[root@qxyw download]# tar xzvf mysql-5.5.36.tar.gz
[root@qxyw download]# cd mysql-5.5.36
[root@qxyw mysql-5.5.36]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/home/mysql
[root@qxyw mysql-5.5.36]# make && make install

执行以下代码就足以了,实行好未来持续cmake,然后再make && make install

并移除服务

陆.布置好以往,大家就开发银行mysql,发现成二个标题运营MySQL提示:The server
quit without updating PID file(…)战败
翻开my.cnf文件设置的日记文件地方/var/log/mysqld.log,错误提醒如下

 

[root@qxyw /]# rm -rf /var/lib/mysql
[root@qxyw /]# rm -rf /usr/lib64/mysql

贰.卸载原有MySQL,先截至原有的MySQL服务,再找寻 find / -name mysql

3.安装cmake