By default, MySQL only supports local access,If you need a remote connection, run the following command in the path of mysql.exeMysql> grant all privileges on *. * TO 'root' @ '% 'identified BY 'rootpasswd' with grant option;/// Enter this command
Delete anonymous users. After MySQL is installed, users with empty usernames and passwords are deleted. This makes it possible for the database server to be logged on without a password. Delete anonymous users to eliminate potential risks. [Root @
Statement for obtaining comment information in table structure MYSQL: Getting table comment: 1 SELECT table_name table name, comment on the TABLE_COMMENT table FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'yikang '# Database Name 2AND
If the on duplicate key update is specified at the end of the INSERT statement and the DUPLICATE value appears in a UNIQUE index or primary key after the row is inserted, UPDATE is executed ON the row with the DUPLICATE value;If the unique value
1. SQLite export can be exported using a variety of tools. I use the SQLite Manager Management plug-in of FireFox. Use the SQLite Manager plug-in to open the database (. db. sqlite3) file and select export. Export the entire library file as a. SQL
Using crontab, the system regularly backs up mysql Databases every day and uses the system crontab to regularly execute backup files. The backup results are saved by date for backup purposes.1. Create the path to save the backup file/mysqldata #
Common mysql database operations (add users) 1. mysql user adding format: grant select on database. * to "username" @ "Login host" identified by "password"; www.2cto.com Example 1. Add a user test1 with the password abc so that he can log on to any
MySQL thread shared memory parameters global shared memory is mainly used by MySQL Instance (mysqld process) and the underlying storage engine to store various global operations and shared temporary storage information, such as Query Cache for Query
MySQL study note _ Summary of the length of MySQL integer fields The following table shows the storage and range of MySQL integer fields:MySQL also supports specifying the display width of an integer (for example, INT (4) in parentheses after a
Mysql Database Import and Export and functions, stored procedures mysql commonly used export data commands: 1. mysql exports the entire database www.2cto.com mysqldump-hhostname-uusername-ppassword databasename> backupfile. SQL
Mysql sets a field to be unique. 1. When creating a table, add the uniqueness constraint.Create table 't_user' ('id' int (11) not null AUTO_INCREMENT, 'username' varchar (18) not null unique, 'Password' varchar (18) not null, primary key ('id') www.2
Mysql database notes go to the installation directory... /bin/mysql.exe cd change Directory dir list all files in the current directory c: \ vesa \... \ a> Angle brackets indicate vasa/in drive C... .. indicates entering the specified directory cd
MySQL Log Note 1. MySQL Log compares the information in the log file. The error log records the problems that occur when the mysqld is started, running, or stopped. Locate the cause of the fault when the system fails. query the Client Connection
Ruby Code 1. open my. add the following parameter to the cnf file: [client]: Add default-character-set = utf8. The following is a code snippet: [client] www.2cto.com # password = [your_password] port = 3306 socket =/tmp/mysql. sock default-character-
MYSQL Quick Start 1. manually start MYSQL: directly run the c: \ mysqld command. 2. As a service method: run the c: \ mysqld-nt -- install command to install mysqld-nt as a windows service. After that, it runs automatically whenever windows starts.
Mysql, SqlServer, and Oracle primary key auto-increment settings 1. Define the primary key as auto-increment identifier type in mysql. If the primary key of the table is set to auto_increment type, the database automatically assigns a value to the
Mysql full-text index MySQL SELECT... WHERE... LIKE '%... % 'the full-text search method is not only inefficient, but also cannot be used for queries starting with the wildcard "%" and "_". A full table scan is required, which puts a lot of pressure
Mysql automatically backs up and sends emails to a specified mailbox. First, write the Export command using mysqladmin pingmysqldump, and then add the attachments to the email. Use the corresponding com to suspend the emails. For details, refer:
MySQL displays table fields, comments, and other information. show databases // lists the MySQL Server database. Show tables [FROM db_name] // lists database data TABLES. Show table status [FROM db_name] // lists data tables and table status
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.