dp

ubuntu and mysql

this post provides a short introduction (with further links) to setting up and handling a MySQL server on ubuntu. useful additional tools are mysql-admin and mysql-query-browser (also available in the repositories)

setup
# install mysql server
mysql-server
# location of the config file (but normally no need to change something in this file)
/etc/mysql/my.cnf
after installation the MySQL server is only accessible on localhost (port 3306), if you want to make the server available in the whole network you have to insert the internal IP-address instead of localhost in the configuration
# set password if not asked during installation
mysqladmin -u root -p password "yourpassword"

handling MySQL server
/etc/init.d/mysql start|stop|restart
for more see reference manual of MySQL

backup of data
either copy the folder
/var/lib/mysql
or type
mysqldump --opt -u root -p --all-databases > backup.sql
to store all databases into the file backup.sql
for restoring the backup file type
mysql -u root -p < backup.sql


Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/7/d395059870/htdocs/dp/wp-includes/class-wp-comment-query.php on line 405

Comments are closed.