当前位置:网站首页>Ubuntu14 install MySQL and configure root account local and remote access
Ubuntu14 install MySQL and configure root account local and remote access
2022-07-01 19:30:00 【Infinitesimal pawn】
install
Ubuntu14 apt Install default installation mysql5.5 edition .
1、sudo su # Switch administrator user
2、sudo apt-get install mysql-server #apt install
3、 You will be asked to confirm during the installation , Input y that will do .
4、 Next, a window will pop up for you to enter root User's password , Be sure to remember , Otherwise, it will be troublesome . Then confirm the input you just entered root User's password .
Input... For the first time :
Second input :
5、 installation is complete
Configure remote access
First of all, please make sure that your server entry and exit rules have been opened 3306 port .
1、 Get into mysql The installation directory command :cd /etc/mysql
2、 see mysql Files in the folder command :ls
3、 modify my.cnf file
command 1:vim my.cnf # edit my.cnf file
command 2: Press i Insert edit .
stay [mysqld] Add... To any of the following lines “skip-grant-tables”( notes :skip-grant-tables: Do not start grant-tables Authorization Form . Its function is MYSQL The server does not load the permission judgment ,mysql Any user in can access the database ).
In addition, you must also bind-address = 127.0.0.1 It is amended as follows bind-address = 0.0.0.0( notes : This is the host that will access the database ip Set to any ip It means )
command 3: According to the first esc Exit edit mode
command 4: Input :wq Press enter save exit .
4、 restart mysql
command :service mysql restart (mysql5.5 The restart command for , If you are mysql5.7 Or above version please use service mysqld restart)
5、 Sign in mysql
command :mysql -u root -p
6、 Refresh the permissions , If you don't refresh, it will , An error is reported when authorizing ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement. important
command :flush privileges;
7、 to grant authorization
command :grant all privileges on *.* to [email protected]'%' identified by "password"; ( Authorize to add remote access root User's command )
8、 see user=root,host=% Whether it was successfully added to the authorization table .
command :select user,host,password from mysql.user;
9、 Unified modification root User's password , Added in the previous step root The user password is authorized according to the previous step by The following values generate hash value .
command :
1)use mysql;
2)update user set password=password("123456") where user="root";(MySQL5.5 Set password for ,MySQL5.7 And above, please use mysql> update user set authentication_string=password("123456") where user="root";)
10、 Refresh the permissions important
command :flush privileges;
11、 sign out
command :quit;
Remote client connection
边栏推荐
- Lumiprobe free radical analysis h2dcfda instructions
- nacos启动失败问题解决与总结
- Cdga | if you are engaged in the communication industry, you should get a data management certificate
- 数商云:从规划到落地,五矿集团如何快速构建数字化发展新格局?
- Learning notes - steps of JDBC connection database operation
- 求各种极限的方法
- Junit单元测试框架详解
- 精益思想:来源,支柱,落地。看了这篇文章就懂了
- 新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?
- 6月刊 | AntDB数据库参与编写《数据库发展研究报告》 亮相信创产业榜单
猜你喜欢
Chaos engineering platform chaosblade box new heavy release
The intelligent epidemic prevention system provides safety guarantee for the resumption of work and production at the construction site
Specification of lumiprobe reactive dye indocyanine green
Les canaux de culture intensive s'efforcent de développer Fu Xin et Wei Shi jiajie pour organiser une conférence de formation sur les nouveaux produits
Lumiprobe cell imaging study PKH26 cell membrane labeling kit
sql查询去重统计的方法总结
见证时代!“人玑协同 未来已来”2022弘玑生态伙伴大会开启直播预约
Methods of finding various limits
微信公众号开发相关流程及功能介绍
Lake Shore—OptiMag 超导磁体系统 — OM 系列
随机推荐
【To .NET】C#集合类源码解析
The former 4A executives engaged in agent operation and won an IPO
Bao, what if the O & M 100+ server is a headache? Use Xingyun housekeeper!
下载(导出)pdf模板文件(比如:审批单),报错:Invalid nested tag *** found, expected closing tag ***
EasyGBS主子码流都为H.265时,切换出现花屏如何解决?
Once the SQL is optimized, the database query speed is increased by 60 times
Gameframework eating guide
Dom4j parsing XML, XPath retrieving XML
线程的并行、并发、生命周期
Netease games, radical going to sea
Contos 7 set up SFTP to create users, user groups, and delete users
Enabling "new Chinese enterprises", SAP process automation landing in China
【直播预约】数据库OBCP认证全面升级公开课
EasyGBS网络不稳定情况下重复请求视频拉流问题的优化
Helium transmission line of lake shore cryostat
How to redraw the header of CListCtrl in MFC
原生js打造日程表-支持鼠标滚轮滚动选择月份-可以移植到任何框架中
学习笔记-JDBC连接数据库操作的步骤
机械设备行业数字化供应链集采平台解决方案:优化资源配置,实现降本增效
indexof和includes的区别