Here is how to locate the engine of your tables in MySQL:
All tables
SELECT table_name, engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE();
or
One single table
SHOW CREATE TABLE test; (replace test with your table name)
Here is how to locate the engine of your tables in MySQL:
All tables
SELECT table_name, engine FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=DATABASE();
or
One single table
SHOW CREATE TABLE test; (replace test with your table name)
To prevent very large auto_increment indices sometimes it is good to reset the indices, so they can start again from 1, 2,3 4 …
You would want to do that if you are using one table and there are no relationships associated with the primary key of that table. An example of that could be when you import a large csv into MySQL, removing and importing the data over and over again.
First: drop the old one ALTER TABLE test DROP COLUMN id; Second: Recreate the index ALTER TABLE test ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (ID);
If you want to iterate through the alphabet here is the code to do it:
for ($i=97; $i<=122; $i++) {
echo chr($i);
}
for ($i=65; $i<=90; $i++) {
echo chr($i);
}
input: 1,234,567
output: 1234567
function remove_commas ($data) {
return (int) str_replace(',' , '', $data);
}
How to Update my Centos 5.7 server to the new 6.2 version?
Upgrading from 5.7 to 6.2 is a major upgrade, contrary to upgrading your system from 5.6 to 5.7, which is a minor upgrade.
yum can handle the minor upgrades.
Major upgrades apparently are not supported. http://centos.org/modules/newbb/viewtopic.php?topic_id=36050&forum=55
So if you want to upgrade your server from 5.7 to 6.2 , you are on your own.
The best way is too implement a new centos 6.2 server and transfer your files.