linux下bin安装mysql的问题

1错误:

mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended


解决方法:

确定是否有配置文件/etc/my.cnf,以及是否有如下设置:

port = 3306

socket = /tmp/mysql.sock

datadir = /var/lib/mysql/


2.you must reset your password using alter user statement before executing this

安装完mysql 之后,登陆以后,不管运行任何命令,总是提示这个


解决方法:

step 1: SET PASSWORD = PASSWORD(‘your new password‘);

step 2: ALTER USER ‘root‘@‘localhost‘ PASSWORD EXPIRE NEVER;

step 3: flush privileges;


3.Field 'ssl_cipher' doesn't have a default value

解决方法:

grant usage on *.* to 'username'@'localhost' identified by 'password' with grant option;

其中username和password替换为自己的用户名和密码;

原理:

通过GRANT语句中的USAGE权限,你可以创建账户而不授予任何权限。它可以将所有全局权限设为’N'。假定你将在以后将具体权限授予该账户。


4.开启binlog方法:

修改my.cnf,在[mysqld]项下增加配置

log-bin=$path/$prefix

server_id=$serverId

说明:server-id参数用于在复制中,为主库和备库提供一个独立的ID,以区分主库和备库


如果不指定server_id,会报如下错:

 You have enabled the binary log, but you haven't provided the mandatory server-id. Please refer to the proper server start-up parameters documentation

猜你喜欢

转载自blog.csdn.net/rdc2008/article/details/52179472