Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and remote connection method of mysql on linux and windows

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "mysql installation and remote connection method on linux and windows". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Mysql is installed on Linux side

Yum list installed mysql* # check to see if it has been installed

Yum-y install mysql-server # server side

Yum-y install mysql-devel # server side

Yum-y install mysql # client

2. Mysql is configured on Linux side

/ etc/my.cnf join default-character-set=utf8

# start the mysql service

Service mysqld start or / etc/init.d/mysqld start

Service mysqld restart

# Boot starts automatically

Chkconfig-- list | grep mysql*

Chkconfig-add mysqld

Chkconfig mysqld on

Chkconfig-- list | grep mysql*

# create a root administrator

Mysqladmin-u root password 123456

# try login

Mysql-u root-p123456

Quit

Mysql-version

3. Enable remote access

# format: grant permission on database name. Table name user @ Login Host identified by "user password"

# (root,%) for remote login and (root,localhost) for local login

Show databases

Describe mysql.user

GRANT ALL PRIVILEGES ON *. * TO root@ "%" IDENTIFIED BY "123456"

GRANT ALL PRIVILEGES ON *. * TO test@ "%" IDENTIFIED BY "123456"

-- update mysql.user set host='%' where user = 'test'

Select user,host,password from mysql.user

Flush privileges

# Open port 3306 on Linux

/ sbin/iptables-I INPUT-p tcp-- dport 3306-j ACCEPT

/ etc/init.d/iptables save

Service iptables restart

# Windows Native remote connection

(there is no need for Windows to install mysql database. As long as you have mysql data tool, you can connect to Linux's mysql database.)

1) install windows mysql

2) configuration of Windows version:

Http://jingyan.baidu.com/article/f3ad7d0ffc061a09c3345bf0.html

3) mysql-h292.168.22.250-port=3306-uroot-p123456

This is the end of the content of "installation and remote connection of mysql on linux and windows". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report