Use a DEB Package to Deploy StoneDB on Ubuntu 20
Step 1. Install StoneDB
- Download the StoneDB software package.
wget https://github.com/stoneatom/stonedb/releases/download/5.7-v1.0.3-GA/stonedb-ce-5.7_v1.0.3.ubuntu.amd64.deb
- Use the DPKG command to install the DEB package.
dpkg -i stonedb-ce-5.7_v1.0.3.ubuntu.amd64.deb
info
If this step fails, run ldd /opt/stonedb57/install/bin/mysqld | grep 'not found'
to check whether any dependent libraries are missing. If yes, run source /opt/stonedb57/install/bin/sourceenv
and then retry this step.
- Map dependent libraries.
source /opt/stonedb57/install/bin/sourceenv
- Initialize the database.
/opt/stonedb57/install/bin/mysqld --defaults-file=/opt/stonedb57/install/my.cnf --initialize --user=mysql
info
If this step fails, run ldd /opt/stonedb57/install/bin/mysqld | grep 'not found'
to check whether any dependent libraries are missing. If yes, run source /opt/stonedb57/install/bin/sourceenv
and then retry this step.
Step 2. Start StoneDB
/opt/stonedb57/install/mysql_server start
Step 3. Change the Initial Password of User root
- Obtain the initial password of user root.
cat /opt/stonedb57/install/log/mysqld.log |grep password
[Note] A temporary password is generated for root@localhost: ceMuEuj6l4+!
# The initial password of user root is ceMuEuj6l4+!
- In a MySQL command-line interface (CLI), log in to StoneDB as user root.
/opt/stonedb57/install/bin/mysql -uroot -p -S /opt/stonedb57/install/tmp/mysql.sock
# Enter the initial password obtained in step 1.
mysql: [Warning] Using a password on the command line interface can be insecure.
- Reset the password for user root.
mysql> alter user 'root'@'localhost' identified by 'stonedb123';
- Grant the remote login privilege to user root.
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'stonedb123';
mysql> FLUSH PRIVILEGES;
Step 4. Stop StoneDB
If you want to stop StoneDB, run the following command:
/opt/stonedb57/install/bin/mysqladmin -uroot -p -S /opt/stonedb57/install/tmp/mysql.sock shutdown
# Enter the new password of user root.