In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following is mainly about how to modify MySQL storage engine types in batches. I hope these contents can bring you practical use, which is also the main purpose of my article on how to modify MySQL storage engine types in batches. All right, don't talk too much nonsense, let's just read the following.
How to view the type of storage engine used by the table:
1.show table status from library name where name = 'table name'
2.use database
Show create table table name
The method to modify the type of storage engine used by the table:
1.alter table table_name engine = engine
2.vim / etc/my.cnf
Add default- storage-engine=MyISAM under [mysqld]
Then restart the service and create a new table to take effect.
3.create table table name (attribute type) engine = engine
4.mysql_convert_table_format command
Modify the storage engine type of database tables in batch
1. Build mysql5.5 under centos7
Tar zxvf mysql-5.5.24.tar.gz-C / opt/
Confirm installation of gcc, gcc-c++, make, cmake
Ncurses-devel 、
Bison 、
Software package for libaio-devel
-add mysql users and join the mysql group-
Useradd-s / sbin/nologin mysql
Mkdir / usr/local/mysql
Cd / opt/mysql-5.5.24.tar.gz
Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql
-DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DWITH_EXTRA_CHARSETS=all
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MEMORY_STORAGE_ENGINE=1
-DWITH_READLINE=1
-DENABLED_LOCAL_INFILE=1
-DMYSQL_DATADIR=/home/mysql
-DMYSQL_USER=mysql
-DMYSQL_TCP_PORT=3306
Make & make install
Chown-R mysql.mysql / usr/local/mysql
Export PATH=$PATH:/usr/local/mysql/bin/\ * Refresh when powered on *\
Or you can choose vi / etc/profile to run source / etc/profile after the last line is joined
Cp support-files/my-medium.cnf / etc/my.cnf
Cp support-files/mysql.server / etc/init.d/mysqld
Chmod 755 / etc/init.d/mysqld
Chkconfig-add / etc/init.d/mysqld
Chkconfig mysqld-level 35 on
-initialize the database-
/ usr/local/mysql/scripts/mysql_install_db\
-- user=mysql\
-- ldata=/var/lib/mysql\
-- basedir=/usr/local/mysql\
-- datadir=/home/mysql
Ln-s / var/lib/mysql/mysql.sock / home/mysql/mysql.sock / * establish a soft connection directly * /
Vi / etc/init.d/mysqld
Basedir=/usr/local/mysql
Datadir=/home/mysql
Systemctl start mysqld.service
Mysqladmin-u root password 'abc123' / / set the root password
two。 Enter MySQL
Install perl-DBI and perl-DBD-MySQL:
Yum install perl-DBI-y
Yum install perl-DBD-MySQL-y
Mysql_convert_table_format-host=localhost-user=root-password=abc123-socket=/tmp/mysql.sock-engine=MyISAM school bank banks / / batch modification
For the above about how to batch modify the type of MySQL storage engine, we do not think it is very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.