查看MYSQL Tips的源代码
←
MYSQL Tips
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Notes == === Change datadir === <source lang=bash> $ service mysql stop Edit the file /etc/mysql/mysql.conf.d/mysqld.cnf and edit the datadir field to point to new location. For example datadir = /data/mysql Then copy the content of /var/lib/mysql to new location: $ cp -pr /var/lib/mysql /data Then edit the /etc/apparmor.d/usr.sbin.mysqld file. Remove /var/lib/mysql and add the new datadir location. In my case it is # Allow data dir access /data/mysql/ r, /data/mysql/** rwk, $ systemctl restart apparmor $ service mysql start </source> <br> === Change root password === <source > $ sudo mysql mysql > alter user 'root'@'localhost' identified with mysql_native_password by 'your_new_passwd'; </source> https://www.configserverfirewall.com/ubuntu-linux/reset-mysql-root-password-ubuntu/ <br>
返回到
MYSQL Tips
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面