ubuntu安装Mysql的问题

database

  • 安装的mysql默认是对表名区分大小写。用root登录,打开并修改 /etc/my.cnf;在[mysqld]节点下,加入一行: lower_case_table_names=1。重启mysql服务service mysqld restart

  • Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha. 解决:SET SQL_SAFE_UPDATES = 0

  • 设置mysql允许远程访问,首先编辑文件/etc/mysql/mysql.conf.d/mysqld.cnf:sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf。注释掉bind-address = 127.0.0.1 保存退出,然后进入mysql服务,执行授权命令:

    grant all on . to root@"%" identified by "你的密码" with grant option;

    flush privileges;

    然后执行quit命令退出mysql服务,执行如下命令重启mysql:

    sudo service mysql restart.

以上是 ubuntu安装Mysql的问题 的全部内容, 来源链接: utcz.com/z/531591.html

回到顶部