
修改MySQL数据库名称的方法如下:
1.语句修改法:
RENAME DATABASE db_name TO new_db_name
这个语法在mysql 5.1.7中被添加进来,到了5.1.23又去掉了。
2.如果所有表都是MyISAM类型的话,可以改文件夹的名字
把data目录中的db_name目录重命名为new_db_name
3.重命名所有的表
代码如下:
4. mysqldump导出数据再导入
代码如下:
5.使用shell脚本重命名所有的表
代码如下:
MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),MySQL数据库系统使用最常用的数据库管理语言--结构化查询语言(SQL)进行数据库管理。由于MySQL是开放源代码的,因此任何人都可以在General Public License的许可下下载并根据个性化的需要对其进行修改。MySQL因为其速度、可靠性和适应性而备受关注。大多数人都认为在不需要事务化处理的情况下,MySQL是管理内容最好的选择。
官方说明(转自知乎):
MySQL-devel-VERSION.glibc23.i386.rpm
The libraries and include files that are needed if you want to compile other MySQL clients, such as the Perl modules.
MySQL-shared-compat-VERSION.glibc23.i386.rpm
This package includes the shared libraries for MySQL 3.23, 4.0, and so on, up to the current release. It contains single-threaded and thread-safe libraries. Install this package instead of MySQL-shared if you have applications installed that are dynamically linked against older versions of MySQL but you want to upgrade to the current version without breaking the library dependencies.
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)