From XennisWiki
(Redirected from PhpMyAdmin)
Jump to: navigation, search

MySQL is an open-source relational database management system (RDBMS) [...] The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. [...] MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack (and other "AMP" stacks). LAMP is an acronym for "Linux, Apache, MySQL, Perl/PHP/Python." (Wikipedia)

Installation and setup

Arch Linux

MariaDB is the default implementation of MySQL on Arch Linux

pacman -S mariadb


Install MySQL (maybe you also install mysql-client)

apt-get install mysql-server

Basic local usage

Further information: A Basic MySQL Tutorial, SQL

Access the MySQL shell

mysql -u root -p

(1) Show databases, (2) create a new database and (3) use or (4) delete a database

CREATE DATABASE your_database_name;
USE your_database_name;
DROP DATABASE another_database;


Installation and setup (Debian)

Further informations: How To Install and Secure phpMyAdmin on Ubuntu 12.04

  • Install phpMyAdmin to administrate the mysql database
apt-get install phpmyadmin
  • Select Yes, when asked during the installation to configure with dbconfig-common
  • Open the Apache config file
vim /etc/apache2/apache2.conf
  • Add at the end of the file the phpMyAdmin configurations file
Include /etc/phpmyadmin/apache.conf
  • Save and close the file. Restart Apache server
service apache2 restart

The user interface you find at http://YOUR-SERVER/phpmyadmin.


Copy values of on column to another one

UPDATE <table> SET <new-column> = <some-column>

Errors and problems

Uninstall MySQL completely (Debian)

apt-get remove --purge mysql-server mysql-client mysql-common
apt-get autoremove
apt-get autoclean

See also

External links