Posts

Showing posts with the label mysql error

Too many connections” error mysql

$ mysql –u root –p SHOW STATUS LIKE 'max_used_connections'; $ mysql –u root –p mysql> SHOW VARIABLES LIKE 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 151 | +-----------------+-------+ # vi /etc/my.cnf max_connections = 512 MySQL my.cnf file - Found option without preceding group Just add  [mysqld]  as first line in the  /etc/mysql/my.cnf  file. Example [ mysqld] max_connections = 512 If on Ubuntu try without the 'd' systemctl start mysql

Tablespace for table xxx exists

[mysqld] innodb_data_file_path=ibdata1:10M:autoextend be sure to add within mysqld A little late here but generally I've seen this problem occur when you get a 'tablespace full' error when running in a 'innodb_file_per_table' mode. Without going into too much detail (more  here ), the database server's tablespace is defined by the innodb_data_file_path setting and by default is rather small. Even made larger, the 'tablespace full' can still occur with larger queries and such (lots of non-table 'stuff' is stored in there, undo logs, caches, etc...). innodb_data_file_path

Error: 'Out of resources when opening file '/tmp/#sql_390d_2.MYD' (Errcode: 24 - Too many open files)

Check /etc/my.cnf.  Under the [mysqld] section, if you have a open_files_limit variable, increase it, eg: open_files_limit=32768 then restart mysqld. systemctl restart mysql 3)  Confirm in mysql itself by checking the open_files_limit variable to ensure it's increased, by running the SQL query: show global variables like 'open%';

mysql Row size too large

innodb_log_file_size = 512M innodb_strict_mode = 0

Field 'po_qnty' doesn't have a default value

As others said, this is caused by the   STRICT_TRANS_TABLES   SQL mode. To check whether  STRICT_TRANS_TABLES  mode is enabled: SHOW VARIABLES LIKE 'sql_mode' ; To disable strict mode: SET GLOBAL sql_mode = '' ; But the next time MySQL restarts, these settings are lost. It should be: [ mysqld ] sql_mode = NO_ENGINE_SUBSTITUTION , STRICT_TRANS_TABLES instead of [ mysqld ] sql_mode = "NO_ENGINE_SUBSTITUTION" then restart mysqld service.

Access denied for user 'root'@'localhost' mysql on empty password login

Access denied for user 'root'@'localhost' that's because  Login without a password is forbidden by configuration (see AllowNoPassword)