Mysql not working after Custombuild upgrade

japz

Verified User
Joined
Jul 21, 2010
Messages
11
Hi all,

I have upgraded custombuild to 2.0 and everything seems to work fine except for Mysql 5.7. Mysql won't start at all. I'm running Centos 6.0.

When I run ./build mysql I see an error:
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

When I do service mysqld start - it only shows: Starting mysqld: [FAILED].

When I look in the custombuild directory I do see the old data in mysql_backup.

Is there anything I can do to do solve this issue?
 
Hi all,

I have upgraded custombuild to 2.0 and everything seems to work fine except for Mysql 5.7. Mysql won't start at all. I'm running Centos 6.0.

When I run ./build mysql I see an error:
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

When I do service mysqld start - it only shows: Starting mysqld: [FAILED].

When I look in the custombuild directory I do see the old data in mysql_backup.

Is there anything I can do to do solve this issue?
Try checking MySQL logs. It could simply be a my.cnf parameter causing this too :)
 
Than you for your prompt reply.

This is the mysqld.log:

Code:
2020-01-30T13:41:07.424307Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-01-30T13:41:07.424449Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-01-30T13:41:07.424463Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2020-01-30T13:41:07.427831Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27) starting as process 7877 ...
2020-01-30T13:41:07.435167Z 0 [Note] InnoDB: PUNCH HOLE support available
2020-01-30T13:41:07.435223Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-01-30T13:41:07.435237Z 0 [Note] InnoDB: Uses event mutexes
2020-01-30T13:41:07.435250Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2020-01-30T13:41:07.435269Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-01-30T13:41:07.435282Z 0 [Note] InnoDB: Using Linux native AIO
2020-01-30T13:41:07.435770Z 0 [Note] InnoDB: Number of pools: 1
2020-01-30T13:41:07.435985Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-01-30T13:41:07.439101Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-01-30T13:41:07.454738Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-01-30T13:41:07.458599Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-01-30T13:41:07.471261Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-01-30T13:41:07.492832Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-01-30T13:41:07.493022Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-01-30T13:41:07.529331Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-01-30T13:41:07.531126Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-01-30T13:41:07.531159Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-01-30T13:41:07.532365Z 0 [Note] InnoDB: Waiting for purge to start
2020-01-30T13:41:07.582729Z 0 [Note] InnoDB: 5.7.27 started; log sequence number 1219714
2020-01-30T13:41:07.583680Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-01-30T13:41:07.583989Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-01-30T13:41:07.584038Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200130 14:41:07
mysqld: Table 'mysql.plugin' doesn't exist
2020-01-30T13:41:07.584259Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2020-01-30T13:41:07.585253Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-01-30T13:41:07.585421Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2020-01-30T13:41:07.585796Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2020-01-30T13:41:07.585880Z 0 [Note] IPv6 is available.
2020-01-30T13:41:07.585940Z 0 [Note]   - '::' resolves to '::';
2020-01-30T13:41:07.585988Z 0 [Note] Server socket created on IP: '::'.
2020-01-30T13:41:07.589535Z 0 [Warning] Failed to open optimizer cost constant tables

2020-01-30T13:41:07.593443Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-01-30T13:41:07.593509Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2020-01-30T13:41:07.593630Z 0 [ERROR] Aborting

2020-01-30T13:41:07.593724Z 0 [Note] Binlog end
2020-01-30T13:41:07.593842Z 0 [Note] Shutting down plugin 'ngram'
2020-01-30T13:41:07.593863Z 0 [Note] Shutting down plugin 'partition'
2020-01-30T13:41:07.593875Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2020-01-30T13:41:07.593888Z 0 [Note] Shutting down plugin 'ARCHIVE'
2020-01-30T13:41:07.593899Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2020-01-30T13:41:07.593926Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2020-01-30T13:41:07.593938Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2020-01-30T13:41:07.593949Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2020-01-30T13:41:07.593961Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2020-01-30T13:41:07.593972Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2020-01-30T13:41:07.593984Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2020-01-30T13:41:07.593995Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2020-01-30T13:41:07.594006Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2020-01-30T13:41:07.594017Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2020-01-30T13:41:07.594028Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2020-01-30T13:41:07.594040Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2020-01-30T13:41:07.594051Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
 
2020-01-30T13:41:07.593443Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-01-30T13:41:07.593509Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2020-01-30T13:41:07.593630Z 0 [ERROR] Aborting

This is serous, as it means there is no MySQL data? :) Please post the output of:
Code:
ls -l /var/lib/mysql/mysql
 
Oops. I had /var/lib/mysql.old, now I renamed it back to /var/lib/mysql., and Mysqld does start now, but still having a problem with the user databases.

The user DB's do exist, but are somehow not linked to each user? When I log in as User1, I can see the actual User1 DB in MySQL Management but in the right pane it show Databases Used: 0. And the website with DB isn't working.
 
When I'm logged in as admin in DA I don't see any DB's. In the Server Stats it show:
# of MySQL DBs - 0

When I use phpmyadmin I do see all the user DB's.

What could it be? I already tried ./build mysql
 
I'm a step further I guess. I can see in the error logs the following:

Uncaught Error: Call to undefined function mysql_connect()

Do I have to downgrade PHP maybe?
 
Yes, there is no mysql_connect() in PHP 7.0+, you'd either need to replace it with mysqli_connect() or just downgrade PHP.
 
Back
Top