Method One: Use the SQL Statement command updateThe cryptographic function PASSWORD(string) that comes with MySQL is required to encrypt a plaintext password, but it cannot be decrypted. Set the password specifically for the Mysql.user (User Rights
Add a table fieldALTER TABLE table1 add transactor varchar (ten) not Null;ALTER TABLE table1 add ID int unsigned not Null auto_increment primary keyModify the field type of a table and specify empty or non-emptyALTER TABLE name change field Name
MySQL password We do not often modify, but sometimes we will forget the password needs to be modified, but also change the password for their own easier to remember! Here are two ways to change the MySQL password
Method One:
This method
1. True connection modification. It is slower when there is more data, and can affect read performance when modified. My_table is the table of operations, InnoDB is the new storage engine.
The code is as follows
Copy Code
Pro-Test can be, recorded February 5, 2018 11:03:221,/etc/my.cnf [mysqld] Increase datadir =/DATA/NAS2,/etc/rc.d/init.d/mysql from "datadir=/data" revision to "Datadir=/data/nas" from "datadir_set=" to "datadir_set=1" 3, move/data directory from the
SET sql_safe_updates = 0;Update and delete operations will be performed smoothlySET sql_safe_updates = 1; ( safe update mode)In the update operation: The update is rejected when the Where Condition (column) has no index available and no limit
First, modify the My.ini configuration file (MySQL configuration file)Character_set_server = UTF8 #设置字符集Restart MySQL database serviceView the current database character setShow VARIABLES like ' character% ';Second, modify the database character
In MySQL database system we modify the user password in a total of three waysThe first type: SET PASSWORD mode# Modify the current login client user password mysql> SET password=password (' 123456789 '); Query OK, 0 rows Affected (0.00 sec) #
Meet a demand today: Modify the permissions of the MySQL user, you need to restrict the specific IP address to access, the first encounter such a requirement, the results in the test process, the use of update system permission to find some problems,
#/etc/init.d/mysqld Stop# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &# mysql-u root MySQL "This step into the MySQL database into the database followed by ② operation"① { mysql> UPDATE user SET Password=password (' NewPassword ')
Today the database table modifies the table structure, and you need to add a column:ALTER TABLE ' xxxx_learn ' ADD COLUMN ' Learn_stage_code ' VARCHAR (+) NULL DEFAULT ' COMMENT ' learning section ' after ' Qualified_rate ';The result has been an
#!/bin/bash#fafu_li# Email: [Email protected]&348926676@qq. com# Time:2015.08.Ten#mysql数据库改名, the official does not have a command to directly modify the database name # only by modifying the table name to implement the source/etc/Profile
To view the server version:Cat/etc/redhat-releaseTo view the MySQL version:Mysql-u root-pUse MySQL;# # #mysql 5.7 or more.Update user SET authentication_string = PASSWORD (' newpassword ') WHERE user = ' root ';# # #mysql 5.7 A second old
#1. Stop the MySQL database/etc/init.d/mysqld stop #2. Execute the following command mysqld_safe --user=mysql --skip-grant-tables --skip-networking & #3. Log in to the MySQL database mysql -u root mysql #4 using root. Update Root password mysql>
MySQL table operations 1,//create tables mysql>create table usertest (id int () PRIMARY key NOT NULL Auto_increment,url varchar (a) not null); 2 Change table name mysql>alter table usertest Rename to Cmf_usertest;mysql>alter table zm_useroplog day
Ext.: http://www.jb51.net/article/39454.htmMethod 1: Use the Set password commandFirst log in to MySQL.Format:mysql> set password for user name @localhost = password (' new password ');Example:mysql> set password for [email protected] = password (' 1
Modifying the table engine methodMethod 1: Modify the Mysql.ini configuration file and restart the MySQL service to take effectModify the My.ini, and under [mysqld] AddDefault-storage-engine=innodbWhere the red font portion is the name of the engine
First of all must have the foreign key, InnoDB what does not say, directly on the change sentence.To remove the foreign key first, then add it.The specific reason seems to be because the alter foreign key operation is not supported. alter table '
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.