MySQL database name method example with special characters, mysql Database Name
Preface
This article explains how to create a database name with special characters in MySQL. The special characters include :! @ # $ % ^
The method is as follows:
Use
The principle of modification is to create a new database and then rename all the tables. Just look at the script below. I'm going to change the name of the download database to DOWNLOADV2.#!/bin/bashmysql-uroot-p1q2w3e4r-e ' CREATE database if not
In MySQL, databases and tables correspond to directories and files under those directories. Therefore, the sensitivity of the operating system determines the case sensitivity of the database and table names. This means that the database and table
In MySQL, databases and tables correspond to directories and files under those directories. Therefore, the sensitivity of the operating system determines the case sensitivity of the database and table names.
In MySQL, databases and tables correspond
If it's myisam. Just change the name of the library name folder under the data directory OKIf it's innodb. It is not possible to modify the name of the library. Rename database or ALTER DATABASE is not a good place to be on the Internet blind 咧咧.
This means that database and table names are case insensitive in Windows and are case-sensitive in most types of Unix systems. A special case is Mac OS X, when the default hfs+ file system is used. However, Mac OS X also supports UFS volumes, which
In MySQL, the database corresponds to the directory in the operating system data directory, and each table in the database corresponds to at least one file in the database directory (or possibly multiple, depending on the storage engine). Therefore,
Securely and quickly change the MySQL database nameGuideMySQL does not seem to have a statement to change the Database Name (maybe I don't know). If you have the permission to manage the database server, you can directly change the directory name,
Mysql database names and table names are case sensitive in different systems. in MySQL, databases and tables correspond to directories and files in those directories. Therefore, the sensitivity of the operating system determines the case sensitivity
Database and table names are case-insensitive in Windows, while they are case-sensitive in most types of UnixLinux systems. So how can we deal with this problem? after some queries, we found that the lower_case_table_names parameter can be case
Lower_case_table_names parameter Details:Where 0: Case sensitive, 1: Case insensitiveMySQL under Linux database name, table name, column name, alias casing rules are like this:1, database name and table name are strictly case-sensitive;2, the table
In MySQL, databases and tables correspond to directories and files in those directories. Thus, the sensitivity of the operating system determines the case sensitivity of database and table naming. This means that database and table names are case
1. RENAME DATABASE db_name to New_db_nameThis one.. This syntax is added to the MySQL 5.1.7, 5.1.23 and removed.It is said that it is possible to lose data. It's better not to use it.See: http://dev.mysql.com/doc/refman/5.1/en/rename-database.html
2
In MySQL, databases and tables are actually directories and texts in the data directory.
Thus, the sensitivity of the operating system determines the case sensitivity of database and table naming. This means that the database and table names are
In MySQL, databases and tables correspond to directories and files in those directories. Thus, the sensitivity of the operating system determines the case sensitivity of database and table naming. This means that database and table names are case
Query all fields of all tables:Select * from WHERE table_name='sys_users'Effect:Query all fields of the specified table:Select * from WHERE table_name='sys_users' and Table_schema= ' Taoke 'Effect:Query the specified type of all fields of the
Getting started: combining PHP with MYSQL ., Connect to the database? Php $ dbhostlocalhost; $ dbuserroot; your mysql username $ dbpass123456; your mysql password $ dbnamedata; your mysql database name connects to the local database
, Connect to the
Five methods to change the mysql database name: 1. RENAMEDATABASEdb_nameTOnew_db_name .. This syntax is added in mysql5.1.7 and removed in 5.1.23. Data may be lost. Or don't use it. See: dev.mysql.comdocrefman5.1enrename-database.html 2
Five methods
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.