Ubuntu中MySQL的卸载,安装,及安装之后的默认配置修改

Ubuntu16.04重新安装MySQL数据库

Ubuntu16.04彻底卸载MySQL

1, linux开启MySQL binlog日志

2, mysql开启远程访问:

进入mysql

grant all privileges on *.* to'root'@'%' identified by '密码' with grant option;
flush privileges;

退出mysql,修改/etc/mysql/mysql.conf.d/mysqld.cnf文件的第43行
bind-address = 127.0.0.1改为 bind-address = 0.0.0.0
重启mysql服务 sudo service mysql restart

3, mysql修改默认端口,默认编码:

修改/etc/mysql/mysql.conf.d/mysqld.cnf文件中
[mysqld]下面的port的值
插入一行:
character-set-server=utf8mb4
/etc/mysql/conf.d/mysql.cnf文件中的[mysql]下,插入:
default-character-set=utf8 mb4
重启mysql
sudo service mysql restart

4, 安装mycli

sudo apt install mycli

你可能感兴趣的:(Ubuntu中MySQL的卸载,安装,及安装之后的默认配置修改)