Project

General

Profile

MySQL Notes » History » Version 7

Amber Herold, 06/29/2010 12:06 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 7 Amber Herold
h2. Find out which installation is being used
8
9
<pre>which mysql</pre> 
10
11 1 Amber Herold
h2. Get access to our databases
12
13
To get access to our databases, you need to ask Christopher (or someone else with the correct privileges) to add you as a user.
14 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).
15 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:
16
17
At a terminal type:
18
<pre>
19
mysql -h cronus4 -u [yourUserName] -p
20
</pre>
21
22
You are prompted to type your default password. Then, change your password with:
23
<pre>
24
set password = password("[new password]");
25
</pre>
26
27
h2. Other MySQL commands to try
28
29
show databases;
30
use [name of db]
31
show tables;
32
describe [name of table];
33 3 Amber Herold
34
h2. To stop a query that is taking too long:
35
36
<pre>
37
mysql> showprocesslist;
38
39
mysql> kill [process Id number];
40
</pre>
41 4 Amber Herold
42
h2. Mysql bug with nested subqueries
43
44
[[Mysql Nested Subqueries Problem]]