This article aims at the MySQL database basic operation carries on the study research, needs to understand the friend not to miss this article.
The following are used on the command line under Windows 64-bit operating systems.
Before we learn, let'
In the last two articles (MySQL backup and restore cold standby, MySQL backup and restore real-world use Lengbei), we mentioned the use of cold standby in the Lengbei and real environment. So starting from this article, let's look at the hot standby.
MySQL master-slave copy and read-Write separation experiment IntroductionIn the actual production environment, if the database read and write on the same database operation, whether in terms of security, high availability or high concurrency and so
Proxy Server Wg61 192.168.0.180 (mysql-proxy)Primary server Wg62 192.168.0.142 (responsible for writing data)Wg63 192.168.0.156 from server (responsible for read-only data)Experimental ideas:
Download Mysql-proxy, install the Lua language on the
MySQL Installation and downloadA: Download MySQL installer b: Install MySQL server side c: Install MySQL client d: Client Connection server E: Send commands to the servers through the client, perform additions and deletions to the database
1. mariadb DatabaseDatabase: DatabasesWhat is a databaseDB, Database: A collection of data, a mainstream database used to store relational tabular data1.1 Virtual Machine Server: Installing the MARIADB Database[Email protected] ~]# yum-y install
1.1MySQL master-Slave delay Replication IntroductionFrom MySQL5.6 to support the master-slave delay replication, the main problem is that when the main library has a logical data deletion or error updates, all the library will be the wrong update,
first, start and close1.1 Linux command to start MySQL:
A. RPM Package Installation: Service mysqld start
B. Source package Installation:/usr/local/mysql/bin/mysqld_safe--user=mysql &
1.2 Linux to restart MySQL command:
First, view all databasesMysql> Show databases;+--------------------+| Database |+--------------------+| information_schema | | mysql | | performance_schema | | WMS |+----------- ---------+Among them, the first
PHP MySQL database common cmd command setshow databases; Display DatabaseCreate database name; Create a databaseUse DatabaseName; Select DatabaseDrop database name deletes databases directly and does not alertShow tables; Show TableDescribe
[Email protected] ~]# Mysql-urootMariaDB [(None)]> SHOW DATABASES;MariaDB [(none)]> QUITTo change the password for the database account:mysqladmin [-u user name] [-p[old password]] password ' new password 'Import/Restore to database:MySQL [-u user
[Email protected] ~]# Mysql-urootMariaDB [(None)]> SHOW DATABASES;MariaDB [(none)]> QUITTo change the password for the database account:mysqladmin [-u user name] [-p[old password]] password ' new password 'Import/Restore to database:MySQL [-u user
first, start and close1.1 Linux command to start MySQL:
A. RPM Package Installation: Service mysqld start
B. Source package Installation:/usr/local/mysql/bin/mysqld_safe--user=mysql &
1.2 Linux to restart MySQL command:
One, 1, the experimental environment: two servers to build a master-slave service to achieve synchronization2. Experimental topology:Primary server HK63 (ip:192.168.2.104)---------from server HK64 (ip:192.168.2.105)3. Experimental ideas:(1), prepare
Change the root password of the MySQL database to modify the root password command to/usr/local/mysql/bin/mysql -urootDefining environment variables temporarily defining environment variablesexport PATH=$PATH:/usr/local/mysql/bin/
Operating mode for iSCSI disks? Internet SCSI, inter-network SCSI interface– A virtual disk technology based on C/s architecture– The server provides disk space, the client connects and uses it as a local disk? ISCSI qualified name specification–iqn.
Mysql common command lines
Mysql common command lines
First, start and stop the mysql Service
Net stop mysql
Net start mysql
Second, log on to mysql
Syntax: mysql-u user name-p User Password
Enter the mysql-uroot-p command, press enter and prompt
Mysql's common basic command summary and default account permissions and modifications have been simply using the database to store data, and windows is also used bad. many commands cannot be remembered when used. so, change to LINUX! No longer use
1. Install MySQL in CentOS [root @ sample ~] # Yum-yinstallmysql-serverlarr; install MySQL and then install the PHP tool ld for accessing the MySQL database
1. Install MySQL in CentOS [root @ sample ~] # Yum-y install mysql-server larr; install
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.