MySQL server without root
It's actually very simple. I'll detail the Linux version, but it's identical for Windows.
- Download MySQL
- Initialize Data Directory
- Create a Config File
- Start MySQL
- Connect to MySQL
1) Download MySQL
Go to MySQL Community and select the "Linux Generic" flavour. Unzip that.
2) Initialize Data Directory
If we try to start MySQL without initializing data-directory, we'll run into errors like:
"Failed to find valid data directory"
"Data Dictionary initialization failed"
3) Create a Config File
[server]
user=frankie
basedir=/home/frankie/mysql/mysql-8.0.29
datadir=/home/frankie/data
[mysqld]
pid-file=/home/frankie/mysql/mysqld.pid
socket=/home/frankie/mysql/mysqld.sock
port=31666
[client]
socket=/home/frankie/mysql/socket
4) Start MySQL
Now all left to do is fire up the server.
5) Connect to MySQL
Now restart MySQL server and that's it, query away using your client of choice.
I'm partial to HeidiSQL and IntelliJ.