设为首页 加入收藏

TOP

一台服务器上运行2个MySQL服务(二)
2015-12-01 16:03:10 来源: 作者: 【 】 浏览:31
Tags:服务器 运行 MySQL 服务
5-11-19T14:40:52.540810Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.


2015-11-19T14:40:52.540816Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.


2015-11-19T14:40:55.180025Z 0 [Warning] InnoDB: New log files created, LSN=45790


2015-11-19T14:40:55.500690Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.


2015-11-19T14:40:55.601943Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8a648e5a-8ecb-11e5-911c-0050569c4b72.


2015-11-19T14:40:55.630337Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.


2015-11-19T14:40:55.631059Z 1 [Note] A temporary password is generated for root@localhost: ze:OCyh)U1&y? <------随机密码


[root@sam bin]# ./mysqld_safe? --defaults-file=/etc/my5.7.9.cnf


151119 22:42:26 mysqld_safe Logging to '/mnt/sda4/mysql5.7.9/data/sam.adsame.com.err'.


151119 22:42:26 mysqld_safe The file /usr/local/mysql/bin/mysqld


does not exist or is not executable. Please cd to the mysql installation


directory and restart this script from there as follows:


./bin/mysqld_safe&


See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information


八.查看启动的进程


[root@sam ~]# ps aux |grep mysql


root? ? 30783? 0.0? 0.0? 66064? 1336 pts/4? ? S? ? 23:02? 0:00 /bin/sh /mnt/sda4/mysql5.7.9/bin/mysqld_safe --datadir=/mnt/sda4/mysql5.7.9/data --pid-file=/mnt/sda4/mysql5.7.9/data/sam.adsame.com.pid


mysql? ? 31110? 0.5 10.2 4504488 414676 pts/4? Sl? 23:02? 0:00 /mnt/sda4/mysql5.7.9/bin/mysqld --basedir=/mnt/sda4/mysql5.7.9 --datadir=/mnt/sda4/mysql5.7.9/data --plugin-dir=/mnt/sda4/mysql5.7.9/lib/plugin --user=mysql --log-error=/mnt/sda4/mysql5.7.9/data/sam.adsame.com.err --pid-file=/mnt/sda4/mysql5.7.9/data/sam.adsame.com.pid --socket=/tmp/mysql5.7.9.sock --port=3307


root? ? 31169? 0.0? 0.0? 65932? 1336 pts/4? ? S? ? 23:02? 0:00 /bin/sh /mnt/sda4/mysql5.6.23/bin/mysqld_safe --datadir=/mnt/sda4/mysql5.6.23/data --pid-file=/mnt/sda4/mysql5.6.23/data/sam.adsame.com.pid


mysql? ? 31732? 1.0 30.1 4601900 1217628 pts/4 Sl? 23:02? 0:01 /mnt/sda4/mysql5.6.23/bin/mysqld --basedir=/mnt/sda4/mysql5.6.23 --datadir=/mnt/sda4/mysql5.6.23/data --plugin-dir=/mnt/sda4/mysql5.6.23/lib/plugin --user=mysql --log-error=/mnt/sda4/mysql5.6.23/data/sam.adsame.com.err --pid-file=/mnt/sda4/mysql5.6.23/data/sam.adsame.com.pid --socket=/tmp/mysql5.6.23.sock --port=3306


root? ? 31770? 0.0? 0.0? 61160? 740 pts/1? ? S+? 23:04? 0:00 grep mysql


九.客户端连接


/mnt/sda4/mysql5.6.23/bin/mysql -uroot -P3306 -h127.0.0.1


/mnt/sda4/mysql5.7.9/bin/mysql -uroot -P3307 -h127.0.0.1


mysql5.7.9修改密码


/mnt/sda4/mysql5.7.9/bin


[root@sam bin]# ./mysqladmin -uroot -P3307 -h127.0.0.1 -p password


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Hbase VS Oracle 下一篇MySQL 5.6.23升级到MySQL 5.7.9

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: