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‘@‘%‘ 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 |
+----------------------------+-------+
10 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 |
+-------------------------+---------+
12 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)