Directadmin cannot create DB user

thomasdk81

Verified User
Joined
Oct 3, 2010
Messages
56
Location
Denmark
After an upgrade using custombuild 2, my mysql is acting up.

When I start the service I get:
Code:
140224 13:32:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2014-02-24 13:32:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-02-24 13:32:07 7451 [Note] Plugin 'FEDERATED' is disabled.
2014-02-24 13:32:07 7451 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-02-24 13:32:07 7451 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-24 13:32:07 7451 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-02-24 13:32:07 7451 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-24 13:32:07 7451 [Note] InnoDB: Using Linux native AIO
2014-02-24 13:32:07 7451 [Note] InnoDB: Using CPU crc32 instructions
2014-02-24 13:32:07 7451 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-02-24 13:32:07 7451 [Note] InnoDB: Completed initialization of buffer pool
2014-02-24 13:32:07 7451 [Note] InnoDB: Highest supported file format is Barracuda.
2014-02-24 13:32:07 7451 [Note] InnoDB: 128 rollback segment(s) are active.
2014-02-24 13:32:07 7451 [Note] InnoDB: Waiting for purge to start
2014-02-24 13:32:07 7451 [Note] InnoDB: 5.6.16 started; log sequence number 336257784
2014-02-24 13:32:07 7451 [Note] Server hostname (bind-address): '*'; port: 3306
2014-02-24 13:32:07 7451 [Note] IPv6 is available.
2014-02-24 13:32:07 7451 [Note]   - '::' resolves to '::';
2014-02-24 13:32:07 7451 [Note] Server socket created on IP: '::'.
2014-02-24 13:32:08 7451 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
2014-02-24 13:32:08 7451 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
2014-02-24 13:32:08 7451 [Note] Event Scheduler: Loaded 0 events
2014-02-24 13:32:08 7451 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.16'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

When I want to add a db via directadmin I get:
Code:
Unable to add user <xxx>. Lost connection to MySQL server during query
The db is created but the user isn't.

This thread seems related: http://forum.directadmin.com/showthread.php?t=46169

System is Centos 5 with:
  • Apache 2.4.7
  • DirectAdmin 1.44.3
  • Exim 4.82
  • MySQL 5.6.16
  • Named 9.3.6
  • ProFTPd 1.3.4d
  • sshd
  • dovecot 2.2.12
  • Php 5.3.28
 
The following should fix it:
Code:
mysql_upgrade --user=`grep "^user=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --password=`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
 
To the rescue as always :)
Thank you!

140224 14:58:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2014-02-24 14:58:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-02-24 14:58:07 14593 [Note] Plugin 'FEDERATED' is disabled.
2014-02-24 14:58:07 14593 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-02-24 14:58:07 14593 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-24 14:58:07 14593 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-02-24 14:58:07 14593 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-24 14:58:07 14593 [Note] InnoDB: Using Linux native AIO
2014-02-24 14:58:07 14593 [Note] InnoDB: Using CPU crc32 instructions
2014-02-24 14:58:07 14593 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-02-24 14:58:07 14593 [Note] InnoDB: Completed initialization of buffer pool
2014-02-24 14:58:07 14593 [Note] InnoDB: Highest supported file format is Barracuda.
2014-02-24 14:58:07 14593 [Note] InnoDB: 128 rollback segment(s) are active.
2014-02-24 14:58:07 14593 [Note] InnoDB: Waiting for purge to start
2014-02-24 14:58:07 14593 [Note] InnoDB: 5.6.16 started; log sequence number 337503078
2014-02-24 14:58:07 14593 [Note] Server hostname (bind-address): '*'; port: 3306
2014-02-24 14:58:07 14593 [Note] IPv6 is available.
2014-02-24 14:58:07 14593 [Note] - '::' resolves to '::';
2014-02-24 14:58:07 14593 [Note] Server socket created on IP: '::'.
2014-02-24 14:58:07 14593 [Note] Event Scheduler: Loaded 0 events
2014-02-24 14:58:07 14593 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.16' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
 
not found

I've the same messages in log
when I try:
mysql_upgrade --user=`grep "^user=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --password=`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
the response is
-bash: mysql_upgrade: not found

custombuild v 2.0
system Linux server 2.6.35 #1 SMP Tue Oct 8 16:43:51 MSK 2013 x86_64
mysql 5.6

whats wrong ?

thanks
 
You seem to be running debian, please try:
Code:
/usr/local/mysql/bin/mysql_upgrade --user=`grep "^user=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --password=`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
 
[solved]

thanks for reply.
Yours command not working for me. I found another way:
My solution:
1. I check the mysql log after first upgrade. There's was wrong version of mysql.
2. Clear my.cnf - restart mysql
3. Install cmake again in debian
4. Rebuild package mysql 5.6.7
5. Run install mysql again [custombuild v2.0]
6. build php -n
7. after this all instances of mysql works fine.
 
Back
Top