蓝桥云MySQL基础-6.3.3导入
1 minute read
蓝桥云MySQL基础实验-6.3.3导入
启动MySQL并由root用户登录,查看安全路径变量,若安全路径为空,
sudo service mysql start
mysql -uroot
MariaDB [(none)]>show variables like '%secure%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | |
| secure_timestamp | NO |
+--------------------------+-----------------------+
3 rows in set (0.00 sec)
#经查看,/var/lib/ 下没有mysql-files目录
创建安全目录,给与可写权限
sudo mkdir /var/lib/mysql-files
sudo chmod a+w /var/lib/mysql-files
修改配置文件
sudo gedit /etc/mysql/my.cnf
#在文本编辑器里,文档最后一行添加:
secure_file_priv=/var/lib/mysql-files
重启MySQL
sudo service mysql restart
mysql -uroot
MariaDB [(none)]>show variables like '%secure%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | /var/lib/mysql-files |
| secure_timestamp | NO |
+--------------------------+-----------------------+
3 rows in set (0.00 sec)
之后操作参照蓝桥云指令操作。
I feedback.
Let me know what you think of this article in the comment section below!
Let me know what you think of this article in the comment section below!
comments powered by Disqus