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

How to install and set up under linux ubuntu system

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

Share

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

This article will explain in detail how to install and set up the linux ubuntu system. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Install MySQL under debian:

1. Build the source or use the CD image, of course, you can insert the CD.

2. Source configuration of local files when active: modify / etc/apt/sources.list file

Example: deb http://192.168.10.73/ sid main

The above settings can be omitted if the computer to be installed can be connected to Internet.

3. After the preparatory work is done, the installation begins now:

1) input: apt-get install mysql-server

2) there will be several inquiry dialogs, no matter whether you can understand it or not, there is no special case to yes all the way to OK, mainly to search for sources, identify files, etc.

3) when all the above are OK, a query dialog box will pop up, prompting you to enter the root password of MySQL

4) then a confirmation password input box will pop up, which is estimated to be readable, so I won't say much about it.

5) then start the installation, which is completed in an instant, and you will find it much simpler than Red Hat. Type mysql-V (remember it is uppercase V, but this is not mysql) to check it out, if it appears:

Mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2

So congratulations, the installation has been successful.

Access settings: the operation tool of Mysql personally thinks that Navicat for MySQL is the best to use, so it is time to solve the problem of remote access to Mysql database. To make it easier for beginners to understand, you can try to use the following commands to understand the basic structure:

TestB:~# mysql-uroot-p123456 enters Mysql with the following prompt:

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 33

Server version: 5.0.51a-24 (Debian)

Type 'help;' or'\ h' for help. Type'\ c'to clear the buffer.

Mysql > show database; View the database

Mysql > use mysql; basic library, where the user and rights management of the database operate

Mysql > show tables; look at the table in the database and you will find that there is a user table, which will be used immediately.

Mysql > select * from user; use this command to view the table first, and you will find that root users can only access it locally.

Execute the following command:

Mysql > grant all on *. * to root@192.168.1.22 identified by "123456"; all represents all permissions, *. * represents all databases, root represents the user name at the time of access, @ is followed by the ip that allows access, the use of% means granting access to any host, and the last string is the access password that matches the user name.

Success will be prompted as follows:

Query OK, 0 rows affected (0.00 sec)

Then execute the following command to view the results:

Mysql > select * from user; will find that a new record has been added

| | 192.168.1.22 | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |

It means that 192.168.1.22 can access Mysql using the root account.

If you want to access remotely, you also need to modify the configuration file / etc/mysql/my.cnf of MySQL, because the default port 3306 only allows local access. Comment this line.

# bind-address = 127.0.0.1

Then restart Mysql,/etc/init.d/mysql restart

OK, you can now access data remotely.

On how to install and set up the linux ubuntu system to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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