The MariaDB server (5.5.35?) which is preinstalled on my linux system came broken, and instead of trying to fix it (#1 it's out of date, #2 I might break the system in the process since it's pre-installed), I downloaded MySQL 5.7.16 (the .tar.gz version, see #2 for reason). Then I changed the data folder, logs folder, etc. to get away from MariaDB and put them in my own my.cnf file. Also made a symbolic link called '/usr/local/mysql' to my actual MySQL installation in my home folder.
I'm having trouble configuring/running
mysqld as mysql user (which came with MariaDB), but it can run well as root (yes, I know the security risks but the server is only for testing).
It seems to have trouble creating some files for writing.
The following is from running
mysqld with mysql user & personal my.conf:
2016-12-05T17:22:26.420468Z 0 [ERROR] InnoDB: Cannot open '/home/me/Downloads/mysql-5.7.16-linux-glibc2.5-x86_64/data//ib_buffer_pool' for reading: Permission denied miscellaneous failures/server shutdown as a result ... 2016-12-05T17:22:26.729869Z 0 [ERROR] InnoDB: Cannot open '/home/me/Downloads/mysql-5.7.16-linux-glibc2.5-x86_64/data//ib_buffer_pool.incomplete' for writing: Permission denied
Initializing the database gives the same error but woth'data/mysql/db.MYI' instead of data/ib_pool.
Here are the file ownerships for mysql (I didn't provide file permissions in case that's irrelevant):
- All folders except data and mysql-files: My home user
- data and mysql-files: mysql
Groups are the same as the owners.
Update: changing /usr/local/mysql permissions let me initialize/start the server, but I still can't connect to it on any user (even root@localhost gets Access Denied), when I removed /usr/local/mysql link and redirected all paths to my home dir, problem came back again.
Can someone help me use another user besides root?