当前位置:网站首页>What are the basic usage methods of MySQL
What are the basic usage methods of MySQL
2022-06-29 04:22:00 【Yisu cloud】
MySQL What are the basic usage methods of
This article “MySQL What are the basic usage methods of ” Most people don't quite understand the knowledge points of the article , So I made up the following summary for you , Detailed content , The steps are clear , It has certain reference value , I hope you can gain something after reading this article , Let's take a look at this article “MySQL What are the basic usage methods of ” Article bar .
MySQL It's the most popular Relational database Management system , stay WEB Application aspect MySQL It's the best RDBMS(Relational Database Management System: Relational database management system ) One of the application software .

MySQL Installation
download MySQL Installation file
install MySQL The following two files are required , You can download it on the official website .
MySQL install
The server The installation commands for client and client are as follows :
[[email protected] local]# rpm -ivh MySQL-server-5.2.0-0.glibc23.i386.rpm[[email protected] local]# rpm -ivh MySQL-client-5.2.0-0.glibc23.i386.rpm
Whether the server-side test is successfully installed , Can run netstat see MySQL Is the port open , The default port is 3306, The order is as follows :
[[email protected] local]# netstat -nat
MySQL Start and stop of
start-up
MySQL After the installation, start the file mysql stay /etc/init.d Under the table of contents , When you need to start , Run the following command :
[[email protected] init.d]# /etc/init.d/mysql start
Stop and restart
Be careful : Different versions may cause different commands , Only the commands of this version are listed here , Please ask Du Niang for other versions .
[[email protected] local]# service mysqld stop[[email protected] local]# service mysqld restart
MySQL To configure
Several important directories
MySQL Not after installation SQL server It is installed in a directory by default , Its database files 、 Configuration files and command files are in different directories , Here are a few directories : 1. Database directory
/etc/lib/mysql/
2. The configuration file
/usr/share/mysql(mysql.server Commands and configuration files )
3. Relevant command
/usr/bin(mysqladmin、mysqldump Wait for the order )
4. The startup script
/etc/rc.d/init.d/
Change login password
MySQL No password by default , The importance of adding passwords after installation is self-evident . 1. command
usr/bin/mysqladmin -u root password \'new-password'\
Format :mysqladmin -u user name -p Old password password New password 2. Example ( to root encryption key 123456):
[[email protected] local]# usr/bin/mysqladmin -u root password 123456
Be careful : Because at the beginning root No password , therefore -p Old passwords can be omitted .
Database backup and recovery
1. Backup database
mysqldump –user=root –password=root password –lock-all-tables Database name > Backup file .sql
2. Recover database
mysql -u root –password=root password Database name
That's about “MySQL What are the basic usage methods of ” The content of this article , I believe we all have a certain understanding , I hope the content shared by Xiaobian will be helpful to you , If you want to know more about it , Please pay attention to the Yisu cloud industry information channel .
边栏推荐
- SEAttention 通道注意力机制
- 不使用union实现Mysql 列转行
- Redis cache penetration, cache breakdown, cache avalanche
- String differences between different creation methods
- 选对学校,专科也能进华为~早知道就好了
- Blue Bridge Cup DFS (I)
- Blue Bridge Cup ruler method
- ROS URDF model is parsed into KDL tree
- Implementation of thread pool based on variable parameter template
- The great gods take connections from the MySQL connection pool in the open of the rich function. The initialization of the connection pool is 20. If the parallelism of the rich function is 1
猜你喜欢

Hcie security day41: theoretical learning: information collection and network detection

Mécanisme d'attention du canal de fixation

赚钱的5个层次,你在哪一层?

The five levels of making money, which level are you on?

Five thousand years of China

【HackTheBox】dancing(SMB)

The second meeting of the Second Council of Euler open source community was held, and Xinhua III, hyperfusion and Godson Zhongke became members of the Council

【新功能】Ambire 钱包集成了 Metis 网络

Establishment of small and medium-sized enterprise network

访问数据库时出现错误
随机推荐
JVM_ 16_ Garbage collector
044. (2.13) add value to yourself
ROS URDF model is parsed into KDL tree
Ansible best practices playbook different context rights raising demo
Implementation of b+ tree index based on xlsx
Analysis on the types of source code anti leakage technology
SEAttention 通道注意力机制
JDBC man Han building code
The people's Bank of China printed and distributed the notice on supporting cross-border RMB settlement of new foreign trade formats
[WC2021] 斐波那契——数论、斐波那契数列
Log in to the MySQL database and view the version number on the command line
Idea modifying JVM memory
Cisco voice card handling configuration
Redis cache penetration, cache breakdown, cache avalanche
Remediation for Unsafe Cryptographic Encryption
要不是和阿里P7聊过,我也不知道自己是个棒槌
SqlServer如何查询除去整列字段为null的结果
热更新流程
NotImplementedError: Could not run torchvision::nms
Installation and configuration of interrealsense d435i camera driver