“UbuntuHelp:MyISAMUnderUbuntu”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/MyISAMUnderUbuntu}} {{Languages|UbuntuHelp:MyISAMUnderUbuntu}} You must remove skip-innodb from /etc/mysql/my.cnf otherwise the MySQL that current...) |
小 |
||
(未显示同一用户的1个中间版本) | |||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:MyISAMUnderUbuntu}} | {{Languages|UbuntuHelp:MyISAMUnderUbuntu}} | ||
You must remove skip-innodb from /etc/mysql/my.cnf otherwise the MySQL that currently ships with Hoary will '''silently''' downgrade your MyISAM tables to MyISAM. Very confusing! | You must remove skip-innodb from /etc/mysql/my.cnf otherwise the MySQL that currently ships with Hoary will '''silently''' downgrade your MyISAM tables to MyISAM. Very confusing! | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
david@bunta:~ $ mysql --host=***** --user=***** --password=***** test2 | david@bunta:~ $ mysql --host=***** --user=***** --password=***** test2 | ||
Reading table information for completion of table and column names | Reading table information for completion of table and column names | ||
You can turn off this feature to get a quicker startup with -A | You can turn off this feature to get a quicker startup with -A | ||
− | + | ||
Welcome to the MySQL monitor. Commands end with ; or \g. | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
Your MySQL connection id is 765 to server version: 4.0.23_Debian-3ubuntu2-log | Your MySQL connection id is 765 to server version: 4.0.23_Debian-3ubuntu2-log | ||
− | + | ||
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | ||
− | + | ||
mysql> drop database test2; | mysql> drop database test2; | ||
Query OK, 0 rows affected (0.02 sec) | Query OK, 0 rows affected (0.02 sec) | ||
− | + | ||
mysql> create database test2; | mysql> create database test2; | ||
Query OK, 1 row affected (0.00 sec) | Query OK, 1 row affected (0.00 sec) | ||
− | + | ||
mysql> CREATE TABLE AccountLink ( | mysql> CREATE TABLE AccountLink ( | ||
− | -> active int(10) unsigned NOT NULL default '0', | + | -> active int(10) unsigned NOT NULL default '0', |
− | -> inactive int(10) unsigned NOT NULL default '0', | + | -> inactive int(10) unsigned NOT NULL default '0', |
− | -> UNIQUE KEY inactive (inactive) | + | -> UNIQUE KEY inactive (inactive) |
− | -> ) TYPE=MyISAM; | + | -> ) TYPE=MyISAM; |
Query OK, 0 rows affected (0.02 sec) | Query OK, 0 rows affected (0.02 sec) | ||
− | + | ||
mysql> | mysql> | ||
mysql> Bye | mysql> Bye | ||
第34行: | 第33行: | ||
-- ------------------------------------------------------ | -- ------------------------------------------------------ | ||
-- Server version 4.0.23_Debian-3ubuntu2-log | -- Server version 4.0.23_Debian-3ubuntu2-log | ||
− | + | ||
-- | -- | ||
-- Table structure for table `AccountLink` | -- Table structure for table `AccountLink` | ||
-- | -- | ||
− | + | ||
CREATE TABLE `AccountLink` ( | CREATE TABLE `AccountLink` ( | ||
− | `active` int(10) unsigned NOT NULL default '0', | + | `active` int(10) unsigned NOT NULL default '0', |
− | `inactive` int(10) unsigned NOT NULL default '0', | + | `inactive` int(10) unsigned NOT NULL default '0', |
− | UNIQUE KEY `inactive` (`inactive`) | + | UNIQUE KEY `inactive` (`inactive`) |
) TYPE=MyISAM; | ) TYPE=MyISAM; | ||
− | + | ||
# | # | ||
# okay it's come out as MyISAM ... I'll fix it! | # okay it's come out as MyISAM ... I'll fix it! | ||
# | # | ||
− | + | ||
david@bunta:~/root/common $ mysql --host=***** --user=***** --password=***** test2 | david@bunta:~/root/common $ mysql --host=***** --user=***** --password=***** test2 | ||
Reading table information for completion of table and column names | Reading table information for completion of table and column names | ||
You can turn off this feature to get a quicker startup with -A | You can turn off this feature to get a quicker startup with -A | ||
− | + | ||
Welcome to the MySQL monitor. Commands end with ; or \g. | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
Your MySQL connection id is 769 to server version: 4.0.23_Debian-3ubuntu2-log | Your MySQL connection id is 769 to server version: 4.0.23_Debian-3ubuntu2-log | ||
− | + | ||
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | ||
− | + | ||
mysql> ALTER TABLE AccountLink Type = MyISAM; | mysql> ALTER TABLE AccountLink Type = MyISAM; | ||
Query OK, 0 rows affected (0.03 sec) | Query OK, 0 rows affected (0.03 sec) | ||
Records: 0 Duplicates: 0 Warnings: 0 | Records: 0 Duplicates: 0 Warnings: 0 | ||
− | + | ||
mysql> Bye | mysql> Bye | ||
david@bunta:~/root/common $ mysqldump --host=***** --user=***** --password=***** test2 | david@bunta:~/root/common $ mysqldump --host=***** --user=***** --password=***** test2 | ||
第69行: | 第68行: | ||
-- ------------------------------------------------------ | -- ------------------------------------------------------ | ||
-- Server version 4.0.23_Debian-3ubuntu2-log | -- Server version 4.0.23_Debian-3ubuntu2-log | ||
− | + | ||
-- | -- | ||
-- Table structure for table `AccountLink` | -- Table structure for table `AccountLink` | ||
-- | -- | ||
− | + | ||
CREATE TABLE `AccountLink` ( | CREATE TABLE `AccountLink` ( | ||
− | `active` int(10) unsigned NOT NULL default '0', | + | `active` int(10) unsigned NOT NULL default '0', |
− | `inactive` int(10) unsigned NOT NULL default '0', | + | `inactive` int(10) unsigned NOT NULL default '0', |
− | UNIQUE KEY `inactive` (`inactive`) | + | UNIQUE KEY `inactive` (`inactive`) |
) TYPE=MyISAM; | ) TYPE=MyISAM; | ||
− | + | ||
-- | -- | ||
-- Dumping data for table `AccountLink` | -- Dumping data for table `AccountLink` | ||
-- | -- | ||
− | + | ||
david@bunta:~/root/common $ | david@bunta:~/root/common $ | ||
− | + | ||
# | # | ||
# Nooo... it's still MyISAM! | # Nooo... it's still MyISAM! | ||
#. | #. | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Other keywords: MySQLMyISAMDialect | Other keywords: MySQLMyISAMDialect | ||
− | |||
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] | [[category:CategoryDocumentation]] [[category:CategoryCleanup]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年12月6日 (四) 10:36的最新版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
You must remove skip-innodb from /etc/mysql/my.cnf otherwise the MySQL that currently ships with Hoary will silently downgrade your MyISAM tables to MyISAM. Very confusing!
david@bunta:~ $ mysql --host=***** --user=***** --password=***** test2 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 765 to server version: 4.0.23_Debian-3ubuntu2-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> drop database test2; Query OK, 0 rows affected (0.02 sec) mysql> create database test2; Query OK, 1 row affected (0.00 sec) mysql> CREATE TABLE AccountLink ( -> active int(10) unsigned NOT NULL default '0', -> inactive int(10) unsigned NOT NULL default '0', -> UNIQUE KEY inactive (inactive) -> ) TYPE=MyISAM; Query OK, 0 rows affected (0.02 sec) mysql> mysql> Bye david@bunta:~ $ mysqldump -a -c --host=***** --user=***** --password=***** test2 -- MySQL dump 9.11 -- -- Host: ***** Database: test2 -- ------------------------------------------------------ -- Server version 4.0.23_Debian-3ubuntu2-log -- -- Table structure for table `AccountLink` -- CREATE TABLE `AccountLink` ( `active` int(10) unsigned NOT NULL default '0', `inactive` int(10) unsigned NOT NULL default '0', UNIQUE KEY `inactive` (`inactive`) ) TYPE=MyISAM; # # okay it's come out as MyISAM ... I'll fix it! # david@bunta:~/root/common $ mysql --host=***** --user=***** --password=***** test2 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 769 to server version: 4.0.23_Debian-3ubuntu2-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> ALTER TABLE AccountLink Type = MyISAM; Query OK, 0 rows affected (0.03 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> Bye david@bunta:~/root/common $ mysqldump --host=***** --user=***** --password=***** test2 -- MySQL dump 9.11 -- -- Host: ***** Database: test2 -- ------------------------------------------------------ -- Server version 4.0.23_Debian-3ubuntu2-log -- -- Table structure for table `AccountLink` -- CREATE TABLE `AccountLink` ( `active` int(10) unsigned NOT NULL default '0', `inactive` int(10) unsigned NOT NULL default '0', UNIQUE KEY `inactive` (`inactive`) ) TYPE=MyISAM; -- -- Dumping data for table `AccountLink` -- david@bunta:~/root/common $ # # Nooo... it's still MyISAM! #.
Other keywords: MySQLMyISAMDialect