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

What is the method of MySQL service and database management

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

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the method of MySQL service and database management". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what is the method of MySQL service and database management"?

1. Start and shut down service instructions

The official MSI installation address of Mysql5.7 under 1.1windows (choose the version you like to install):

Https://downloads.mysql.com/archives/installer/

1.1.1:win7 will encounter problems: unable to locate the program input point fesetround in the dynamic link library solution:

Download C++ Library address:

Https://support.microsoft.com/en-us/help/3138367/update-for-visual-c-2013-and-visual-c-redistributable-package

Download the selected installation and proceed to the next step.

1.2.Under windows (mysql57 is the name of mysql service):

Launch: net start mysql57

Turn off: net stop mysql57

1.3.Under linux (mysql is the name of mysql service):

Start: [root@localhost ~] service mysql start

Close: [root@localhost ~] service mysql stop

1.4. Enter cmd form into mysql under windows:

Cd to the bin directory of the mysql installation:

C:\ Windows\ system32 > cd C:\ Program Files\ MySQL\ MySQL Server 5.7\ bin

Connect to the mysql server:

C:\ Program Files\ MySQL\ MySQL Server 5.7\ bin > mysql-uroot-pEnter password: * Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 3Server version: 5.7.17-log MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >

Mysql represents the client command,-u is followed by the connected database user, and-p indicates that a password is required.

1.4. Database management

1.4.1. Create an orderManage database

Mysql > create database orderManage;Query OK, 1 row affected (0.00 sec)

1.4.2. Show all databases

Mysql > show databases;+-+ | Database | +-+ | information_schema | | cluster | | mysql | | test | | orderManage | +-+ 5 rows in set (0.00 sec)

As you can see, in the above list, in addition to the orderManage you just created, there are four other databases, all of which are installed

MySQL is created automatically by the system, and its respective functions are as follows.

1. Information_schema: mainly stores some database object information in the system. For example, user table information, column information, permission information, character set information, partition information and so on.

2. Cluster: stores the cluster information of the system.

3. Mysql: the user rights information of the system is stored.

4. Test: a test database created automatically by the system, which can be used by any user.

1.4.3. Choose to enter a certain data

Choose to enter the orderManage database:

Mysql > use ordermanage;Database changed

From this, it can be found that when you choose to enter the database, the name of the database is not case-sensitive.

1.4.4. View all tables in this database

Mysql > show tables;Empty set (0.00 sec)

At this point, it is shown that there are no tables in the orderManage database (Empty set indicates that the operation result is empty)

1.4.5. Delete the database

Mysql > drop database ordermanage;Query OK, 0 rows affected (0.01 sec)

Configure MySQL to allow remote access

The following problems occurred over the ip connection:

Solution:

Enter the mysql database as a root user and query the login user information:

Mysql-u root-puse mysql;select host from user where user = 'root'

Set host to%

Update user set host='%' where user='root'

Remember to execute flush privileges to make the configuration take effect immediately after Host modification is completed.

Flush privileges; so far, I believe you have a deeper understanding of "what is the method of MySQL service and database management". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Development

Wechat

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

12
Report