Slackware, Fedora, Red Hat, Open Source, Perl, PHP, MySQL, and other junk.

MySQL

mysql.sock missing

mysql.sock is created by mysqld when it starts.

Start mysql:

> mysql -u root -p -h databasehost
Enter password:
mysql>

Enter this query:

SHOW VARIABLES LIKE 'socket';

Mysql will then return the location of the socket.. make sure that is the correct location..

You can also try restarting your mysqld to see if it will re-create the socket if that is the correct location.

Importing a .dmp file into a MySQL database

mysql -u root -p -h DBSERVER dbname < dbname.sql

The above assumes that the host name is DBSERVER, the database name is “dbname” and the dumpfile uploaded was named “dbname.sql”.

Set query_cache to improve performance

These values can be set through the mysql command line or in /etc/my.cnf.

When you set query_cache_size to a non-zero value, keep in mind that the query cache needs a minimum size of about 40KB to allocate its structures.

To see the current query_cache settings:

mysql> SHOW VARIABLES LIKE '%query_cache%';
+------------------------------+---------+
| Variable_name                | Value   |
+------------------------------+---------+
| have_query_cache             | YES     |
| query_cache_limit            | 8388608 |
| query_cache_min_res_unit     | 4096    |
| query_cache_size             | 8388608 |
| query_cache_type             | ON      |
| query_cache_wlock_invalidate | OFF     |
+------------------------------+---------+
6 rows IN SET (0.19 sec)

To enable query_cache in my.cnf:

query_cache_type = 1


Personal Tools