当前位置:首页 > 技术手札 > 正文内容

ubuntu 安装mysql

秋风渡红尘7年前 (2018-09-18)技术手札1786
sudo apt-get install mysql-server
sudo apt isntall mysql-client
sudo apt install libmysqlclient-dev
检测是否安装成功:
sudo netstat -tap | grep mysql

登录:

mysql -uroot -p你的密码

如果安装时没提示输入密码,则安装完成后

 sudo vim /etc/mysql/debian.cnf

来查看账号和密码。


登录mysql,修改账号密码:

mysql> update mysql.user set authentication_string=password('new password') where user='root' and Host ='localhost';
mysql> update user set plugin="mysql_native_password"; 
mysql> flush privileges;
mysql> quit;


退出mysql,重启mysql:

sudo service mysql restart

扫描二维码推送至手机访问。

版权声明:本文由咿呀贝发布,如需转载请注明出处。

本文链接:https://yiyabei.cn/?id=27

标签: ubuntu
分享给朋友:

相关文章

ubuntu VPS 安装LXDE+VNC桌面 附配Firefox浏览器及简体中文

ubuntu VPS 安装LXDE+VNC桌面 附配Firefox浏览器及简体中文

apt-get install xorg lxde-core tightvncserver tightvncserver :1 tightvncserver -kill :1 vi ~/.vnc/xstartup 添加 lxter...

Ubuntu 16.04下忘记MySQL密码如何重置

Ubuntu 16.04下忘记MySQL密码如何重置

I. 在终端输入 sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf II. 在[mysqld]下方的skip-external-locking下面添加...

emlog修改为Https

emlog修改为Https

模板里面有写死的http,需要改成https header.php footer.php include/lib/function.base.php第73行 re...

cocos creator的Action类整理

cocos creator的Action类整理

文章来源:https://blog.csdn.net/cchgood/article/details/80930764 Action类 Action类是所有动作类型的基类  并且Action有两个类别  1、...

cocos creator使用typescrip模板的正确姿势

cocos creator使用typescrip模板的正确姿势

// MyModule.ts const {ccclass, property} = cc._decorator; @ccclass export class MyModule extends cc.Component { @pr...

cocos creator使用typescrip模板至export和import

cocos creator使用typescrip模板至export和import

export default XX 和 import XX from '...' 搭配。 export XX 和 import {XX} from...