Grant all on Databasename.tablename to ' username ' @ ' xxx.xxx.xxx.xxx ' identified by ' Complexpassword ';
Grant all on discuz.* to ' username ' @ ' xxx.xxx.xxx.% ' identified by ' Complexpassword ';
Grant all on discuz.* to ' username ' @ '% ' of ' identified by ' Complexpassword ';
Flush privileges;
Show Processlist;
Show variables like "max_connections";
Mysql> Show variables like "%connect%";
+--------------------------+-------------------+
| variable_name | Value |
+--------------------------+-------------------+
| character_set_connection | Latin1 |
| collation_connection | Latin1_swedish_ci |
| Connect_timeout | 10 |
| Init_connect | |
| max_connect_errors | 10 |
| max_connections | 151 |
| max_user_connections | 0 |
+--------------------------+-------------------+
7 Rows in Set (0.00 sec)
Mysql> Show variables like "%timeout%";
+----------------------------+-------+
| variable_name | Value |
+----------------------------+-------+
| Connect_timeout | 10 |
| Delayed_insert_timeout | 300 |
| Innodb_lock_wait_timeout | 50 |
| Innodb_rollback_on_timeout | OFF |
| Interactive_timeout | 28800 |
| Net_read_timeout | 30 |
| Net_write_timeout | 60 |
| Slave_net_timeout | 3600 |
| Table_lock_wait_timeout | 50 |
| Wait_timeout | 28800 |
+----------------------------+-------+
Rows in Set (0.00 sec)
Mysql> Show variables like "%buffer%";
+-------------------------+---------+
| variable_name | Value |
+-------------------------+---------+
| Bulk_insert_buffer_size | 8388608 |
| Innodb_buffer_pool_size | 8388608 |
| Innodb_log_buffer_size | 1048576 |
| Join_buffer_size | 131072 |
| Key_buffer_size | 8384512 |
| Myisam_sort_buffer_size | 8388608 |
| Net_buffer_length | 16384 |
| Preload_buffer_size | 32768 |
| Read_buffer_size | 131072 |
| Read_rnd_buffer_size | 262144 |
| Sort_buffer_size | 2097144 |
| Sql_buffer_result | OFF |
+-------------------------+---------+
Rows in Set (0.00 sec)
Mysql> Show variables like "%err%";
+--------------------+---------------------+
| variable_name | Value |
+--------------------+---------------------+
| Error_count | 0 |
| Log_error | /var/log/mysqld.log |
| max_connect_errors | 10 |
| Max_error_count | 64 |
| slave_skip_errors | OFF |
+--------------------+---------------------+
5 rows in Set (0.00 sec)
Mysql> exit
Bye
# CAT/ETC/MY.CNF
[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
User=mysql
# Disabling Symbolic-links is recommended to prevent assorted security risks
Symbolic-links=0
[Mysqld_safe]
Log-error=/var/log/mysqld.log
Pid-file=/var/run/mysqld/mysqld.pid
mysql> Repair table databasename.tablename;
mysql> Repair table discuz.pre_forum_post;
+-----------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------+--------+----------+----------+
| Discuz.pre_forum_post | Repair | Status | OK |
+-----------------------+--------+----------+----------+
1 row in Set (0.00 sec)
MySQL based Operation Grant, show, repair, log_error, etc.