Hi Guys,
There are several ways to start and stop mysql. Let me share the things that I know.
Starting the mysql server:
Server~Name ] # mysqld_safe –-defaults-file = /path/to/my.cnf -–datadir = path/to/data/directory –basedir = /path/to/base/directory –user = mysql &
Note : mysqld and mysqld_safe are not the same.
“mysqld” is the MySQL server daemon program also known as [...]
Consider 10.168.1.1 as your local machines IP address and 10.168.1.2 as the remote host’s IP that you intend to connect.
First thing that you need to do is to check whether port 3306 in the remote host is open.You can use telnet command to check it.
localhost$] telnet 10.168.1.2 3306
Trying 10.168.1.2…
Connected to remote6.106 (10.168.1.2).
Escape character is ‘^]’.
8
5.1.36-logJU[G1_k{BI*3`m"]0w’Z
If [...]
There are two ways to reset MySQL root password as follows:
FIRST WAY
Stop the server
Open a text file, give the below statement and save the file (for example the filename is /tmp/newpass.txt).
UPDATE mysql.user SET Password=PASSWORD(’YourNewPassword’) WHERE User=’root’ and host=’localhost’;
FLUSH PRIVILEGES;
Now, start the server with –init-file option
mysqld_safe –init-file=/tmp/newpass.txt &
You [...]
When I tried to connect mysqld server, I got this error.
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysql.sock’
1. Check whether mysqld server is running or not, using the below command
ps -ef | grep mysql
If mysqld is running, then check the socket path in the .cnf file and give the correct path [...]
I ran a explain plan in MySQL and i got
mysql> explain SELECT users.user_id FROM friends INNER JOIN users ON friends.friend_to = users.user_id WHERE friends.friend_from=108643 and friends.friend_to=108643;
+—-+————-+——-+——+—————+——+———+——+——+—————————————————–+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra [...]
I started MySQL server like this,
/usr/local/src/mysql-5.1.42-linux-x86_64-glibc23/bin/mysqld_safe –datadir=/usr/local/src/mysql-5.1.42-linux-x86_64-glibc23/data –basedir=/usr/local/mysql-5.1.42-linux-x86_64-glibc23 &
I got the error shown below
mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable.
and I fixed by entering in to MySQL installed directory and started the server
cd /usr/local/src/mysql-5.1.42-linux-x86_64-glibc23
./bin/mysqld_safe –datadir=/usr/local/src/mysql-5.1.42-linux-x86_64-glibc23/data –basedir=/usr/local/mysql-5.1.42-linux-x86_64-glibc23 &
Hi,
MySQL Cluster executes the queries depending on the below type of scan’s it does
Primary key lookup
Unique key lookup
Ordered index scan (i.e., non-unique indexes that use T-trees)
Full table scan
Let’s say you have 4 data nodes in your cluster (NoOfReplicas=2). This means you have 2 node groups and each one has half the data. Cluster uses a [...]
Hi,
When we take a mysqldump with routines or show procedure status where Db=’dbname’;
The mysqld server got an error like “Lost connection to mysqld server”, when we login into server the will be running and it got restarted.
To fix this, upgrade the db by using mysql_upgrade and it got fixed for me.
Thanks,
Suresh Kuna
This type of error may occur in the below scenarios.
1) It indicates network connectivity trouble. If the error message includes “during query” then we have to look at the query and the number of rows being sent.
Then try increasing “net_read_timeout” variable from its default value.
2) It can happen when the client is attempting the initial [...]
Hi,
If the Mysql is not starting and the error log consists of the below error after the configuration of a slave with the tar file of master.
081022 6:19:02 InnoDB: Warning: shutting down a not properly started
InnoDB: or created database!
081022 6:19:02 /usr/local/mysql4020/libexec/mysqld: Shutdown Complete
InnoDB: Error: data file /mysql/data/mysqld/ibdata1 is of a different size
InnoDB: 128000 pages (rounded [...]