mysql er进制包安装_mysql二进制包安装

./bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql57/ --datadir=/mysqldata

./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

./bin/mysqld --initialize --datadir=/mysqldata

dadlI

首次安装

[root@localhost mysql57]# ./bin/mysqld --initialize --datadir=/mysqldata

2019-03-26T02:35:50.743709Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-03-26T02:35:50.743828Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.

2019-03-26T02:35:50.744762Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.

2019-03-26T02:35:50.744784Z 0 [ERROR] Aborting

再次初始化 ./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

[root@localhost mysql]# ./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

2019-03-26T02:39:41.951440Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-03-26T02:39:42.333828Z 0 [Warning] InnoDB: New log files created, LSN=45790

2019-03-26T02:39:42.408721Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2019-03-26T02:39:42.470209Z 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: 68ccea0c-4f70-11e9-b878-0cc47a90c0aa.

2019-03-26T02:39:42.472276Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2019-03-26T02:39:42.473157Z 1 [Note] A temporary password is generated for root@localhost: ca4DZJRog!SK

配置文件

cp -a ./support-files/my-default.cnf /etc/my.cnf

新下的软件包不存在 my-default.cnf 这个文件

启动报错:

[root@localhost mysql]# service mysqld start

Starting MySQL.2019-03-26T02:45:10.453082Z mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.

The server quit without updating PID file (/usr/local/mysql[FAILED]calhost.localdomain.pid).

修改mysql.cnf中的socket文件: socket = /tmp/mysql.sock

进去需要先修改密码

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

修改密码; set password = password('ca4DZJRog#SK')

flush privileges

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值