当前位置:网站首页>Ubuntu system installation and MySQL configuration
Ubuntu system installation and MySQL configuration
2022-07-01 09:42:00 【Yimuzixi】
One 、 install MySQL
1. install mysql service
sudo apt-get updatesudo apt install mysql-server-5.72. mysql edition
mysql -V3. see MySQL Default account and password
sudo cat /etc/mysql/debian.cnfTwo 、 To configure MySQL
sudo mysql_secure_installation#1
VALIDATE PASSWORD PLUGIN can be used to test passwords...
Press y|Y for Yes, any other key for No: N
#2
Please set the password for root here...
New password: ( Input password )
Re-enter new password: ( Repeat input )
#3
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them...
Remove anonymous users? (Press y|Y for Yes, any other key for No) : N
#4
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network...
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : N
#5
By default, MySQL comes with a database named 'test' that
anyone can access...
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : N
#6
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y 3、 ... and 、 see mysql Service status
systemctl status mysql.service ps -ef|grep mysqldFour 、 modify root Account secret authentication method
sudo cat /etc/mysql/debian.cnfpassword The next is the password
Then type on the command line :
mysql -u debian-sys-maint -p- In the presence of Enter password Enter the password above , Get into mysql Command mode
- Create database , Change Password
use mysql;
update mysql.user set authentication_string=('password') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
flush privileges;
quit;5、 ... and 、 Configure remote access mysql
1. Modify the configuration file , Comment out bind-address = 127.0.0.1
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf2. Save and exit , Get into mysql
mysql -uroot -pmysql> use mysql;
mysql> update user set host='%' where user = 'root';
mysql> flush privileges;restart
sudo service mysql restartCheck the status
systemctl status mysql.service6、 ... and 、 Delete MySQL
Delete mysql:
sudo apt autoremove --purge mysql-server-*
sudo apt remove mysql-server
sudo apt autoremove mysql-server
sudo apt remove mysql-commonClean up residual data
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
边栏推荐
- The latest masterpiece of Alibaba, which took 182 days to produce 1015 pages of distributed full stack manual, is so delicious
- 电脑USB、HDMI、DP各种接口及速度
- laravel postman 提交表单出现419错误。2020年7月6日记。
- 架构实战营 模块九:设计电商秒杀系统
- js作用域链与闭包
- 炒币,亏了1000万。
- HMS Core音频编辑服务3D音频技术,助力打造沉浸式听觉盛宴
- SQL学习笔记(02)——数据库表操作
- Network counting 01 physical layer
- Drive away bad emotions and stop worrying
猜你喜欢

苹果放大招!这件事干的太漂亮了……

dsPIC30F6014a LCD 方块显示

HMS core audio editing service 3D audio technology helps create an immersive auditory feast

Construction of esp8266 FreeRTOS development environment

云原生到底是什么?它会是未来发展的趋势吗?

MapReduce编程基础

计网01-物理层

Nacos service configuration and persistence configuration

Cortex M4 systick details

京东与腾讯续签三年战略合作协议;起薪涨至26万元!韩国三星SK争相加薪留住半导体人才;Firefox 102 发布|极客头条...
随机推荐
HMS core audio editing service 3D audio technology helps create an immersive auditory feast
Latex插入的eps图片模糊解决方法
How to realize the usage of connecting multiple databases in idel
闭包实现迭代器效果
Short circuit operator lazy evaluation
[unity rendering] customized screen post-processing
js 使用toString 区分Object、Array
In terms of use
js原型继承仅可继承实例而非构造器
Dspic30f6014a LCD block display
Implementation and application of queue
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
JS use toString to distinguish between object and array
Import and export of power platform platform sharepointlist
Niuke monthly race 22 tree sub chain
SQL learning notes (03) -- data constraint relationship
历史上的今天:九十年代末的半导体大战;冯·诺依曼发表第一份草案;CBS 收购 CNET...
Meituan P4 carefully collated microservice system architecture design manual to see the world of microservice architecture
MapReduce programming basics
新数据库时代,不要只学 Oracle、MySQL