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

ubuntu 安装mysql

秋风渡红尘8年前 (2018-09-18)技术手札2352
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
分享给朋友:

相关文章

工作站T7810重装系统注意事项

工作站T7810重装系统注意事项

        dell的工作站T7810(Dell Precision Tower 7810)由于使用了磁盘阵列技术,在重装系统时发现会找不到任何驱动设备。...

win7升级ie8至ie11后无法打开

win7升级ie8至ie11后无法打开

win7升级ie8至ie11后无法打开,表现为 1、双击无反应,进程中没有ie进程。 2、卸载ie11后,连ie8也无法使用路。 3、检查windows功能,ie是启用的。 4、想起来用...

carlibre抓取网页内容生成电子书

carlibre抓取网页内容生成电子书

#!/usr/bin/python # encoding: utf-8 from calibre.web.feeds.recipes import BasicNewsRecipe class Pro_Git_Chinese(Basic...

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

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

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

caddy的文件目录

caddy的文件目录

通过查看 /usr/local/caddy vim /usr/local/caddy/Caddyfile 得知文件目录是在 /etc/v2ray/pages...

emlog修改为Https

emlog修改为Https

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