MySQL Notes » History » Version 6
  Amber Herold, 06/28/2010 12:52 PM 
  
| 1 | 1 | Amber Herold | h1. MySQL Notes | 
|---|---|---|---|
| 2 | |||
| 3 | 5 | Amber Herold | h2. restart mysql on centOS | 
| 4 | |||
| 5 | 6 | Amber Herold | <pre> /etc/init.d/mysqld restart </pre> | 
| 6 | 5 | Amber Herold | |
| 7 | 1 | Amber Herold | h2. Get access to our databases | 
| 8 | |||
| 9 | To get access to our databases, you need to ask Christopher (or someone else with the correct privileges) to add you as a user. | ||
| 10 | 2 | Amber Herold | Our databases reside on Cronus4 (Appion and Leginon things), ami (websites and tools like Redmine), and Fly (a copy of Cronus4 used for testing). | 
| 11 | 1 | Amber Herold | Once added, you will need to change your password from the default to something all your own on each server that you are added to. Here's how: | 
| 12 | |||
| 13 | At a terminal type: | ||
| 14 | <pre> | ||
| 15 | mysql -h cronus4 -u [yourUserName] -p | ||
| 16 | </pre> | ||
| 17 | |||
| 18 | You are prompted to type your default password. Then, change your password with: | ||
| 19 | <pre> | ||
| 20 | set password = password("[new password]"); | ||
| 21 | </pre> | ||
| 22 | |||
| 23 | h2. Other MySQL commands to try | ||
| 24 | |||
| 25 | show databases; | ||
| 26 | use [name of db] | ||
| 27 | show tables; | ||
| 28 | describe [name of table]; | ||
| 29 | 3 | Amber Herold | |
| 30 | h2. To stop a query that is taking too long: | ||
| 31 | |||
| 32 | <pre> | ||
| 33 | mysql> showprocesslist; | ||
| 34 | |||
| 35 | mysql> kill [process Id number]; | ||
| 36 | </pre> | ||
| 37 | 4 | Amber Herold | |
| 38 | h2. Mysql bug with nested subqueries | ||
| 39 | |||
| 40 | [[Mysql Nested Subqueries Problem]] |