phpMyadmin is a tool that allows to administering a MySQL server through a web interface, is feature-rich and presents a friendly and intuitive interface, available in 62 languages, support mysqli, InnoDB foreign keys and custom settings. With phpMyadmin we can:
- Manage multiple MySQL servers
- Perform maintenance to the MySQL server, database and tables, recommending configurations for the server
- Manage users and privileges
- View tables, views, columns, indexes
- Check referential integrity
- Create/rename/copy/delete tables, views, columns, indexes
- Create/edit/run/export/delete stored procedures
- Create/edit/export/delete events and triggers
- Execute, edit and make bookmarks to consultations and consultation groups
- Import / export from/to various formats: CSV, SQL, XML, PDF
- Export to various formats: CSV, SQL, XML, PDF
- Get DER of a data base
The following procedure has been ejcutado on a Server 5.7 CentOS with php-5.3, apache and phpMyAdmin-3.4.10.1 version, but it can be used on any distro even in SO BSD.
1. download phpMyAdmin
Go to the phpMyadmin site and select the desired version 3.x series requires php > 5.2
Optionally you can install php extensions: mbstring, mcrypt. To install these extensions, it is recommended to see the article: upgrading to PHP 5.3. x on CentOS
2 unpack
We assume that you downloaded version phpMyAdmin-3.4.10.1-english.7z in $HOME
$ 7z x phpMyAdmin-3.4.10.1-english.7z
3. copy to/var/www /
$ sudo cp - v phpMyAdmin * /var/www/7z
4. change context if SELinux
$ sudo chcon - Rt /var/www/phpMyAdmin httpd_sys_content_t *
5 change owner
$ sudo chown - Rc root:apache /var/www/phpMyAdmin *
The following steps 6-8 are necessary if you want to enable extra features before proceeding please read the following articles:
–Manage Server MySQL – basic
6. create bd phpmyadmin
MySQL > create schema phpmyadmin; MySQL > use phpmyadmin
7 create user and give full access to phpmyadmin
MySQL > grant all on phpmyadmin * to 'usuario'@'locahost' identified by 'password'; MySQL > flush privileges;
8 run script: create_tables.sql that is located in the folder phpMyAdmin scripts
MySQL > source path/create_tables.sql
9. to create virtual host and point to the folder phpMyAdmin that is in/var/www /
–Install and configure Apache HTTP server
10 create the phpMyAdmin configuration file
$ sudo cp - v /var/www/phpMyAdmin/config.sample.inc.php /var/www/phpMyAdmin/config.inc.php
11 here I leave my configuration file
<?php?> / * vim: set expandtab sw = 4 ts = 4 sts = 4: * / /** * phpMyAdmin sample configuration, you can use it as base for * manual configuration. For easier setup you can use setup / * * All directives are explained in Documentation.html and on phpMyAdmin * wiki <http: wiki.phpmyadmin.net="">.</http:> * * phpMyAdmin @package */ /* * This is needed for cookie based authentication to encrypt password in * cookie */ $cfg['blowfish_secret'] = "; / * YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /* * Servers configuration */ $i = 0; /* * First server */ $i++; / * Authentication type * / $cfg['Servers'][$i]['auth_type'] = 'cookie'; / * Server parameters * / $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = true; / * Select mysqli if your server has it * / $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = false; /* * phpMyAdmin configuration storage settings. */ / * User used to manipulate with storage * / $cf['Servers'][$i]['controluser']g = 'user - el-paso-7'; $cf['Servers'][$i]['controlpass']g = 'key - el-paso-7'; / * Storage database and tables * / $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][$i]['relation'] = 'pma_relation'; $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; $cfg['Servers'][$i]['history'] = 'pma_history'; $cfg['Servers'][$i]['tracking'] = 'pma_tracking'; $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig'; / * Contrib / Swekey authentication * / $cfg = ['Servers'][$i]['auth_swekey_config']' / etc/swekey - WFP. conf'; /* * End of servers configuration */ /* * Directories for saving/loading files from server */ $cf['UploadDir']g = "; $cf['SaveDir']g = "; /** * Define whether a user should be displayed to "show all (records)" * button in browse mode or not. * default = false */ $cfg['ShowAll'] = true; /** * Number of rows displayed when browsing a result set. If the result * set contains more rows, "Previous" and next. * default = 30 */ $cfg['MaxRows'] = 50; /** * Use graphically less intense menu tabs * default = false */ $cfg['LightTabs'] = true; /** * disallow editing of binary fields * valid values are: * false allow editing * 'blob' allow editing except for BLOB fields * 'all' disallow editing * default = blob */ $cfg['ProtectBinary'] = 'all'; /** * Default language to use, if not browser-defined or user-defined * (you find all languages in the locale folder) * uncomment the desired line: * default = 'en' */ $cfg ['DefaultLang']= 'en'; $cfg =['DefaultLang'] 'from'; /** * default display direction (horizontal|vertical|horizontalflipped) */ $cfg['DefaultDisplay'] = 'horizontal'; /** * How many columns should be used for table display of a database? * (a value larger than 1 results in some information being hidden) * default = 1 */ $cfg['PropertiesNumColumns'] = 2; /** * Set to true if you want DB-based query history. If false, this utilizes * JS-routines to display query history (lost by window close) * * This requires configuration storage enabled, see above. * default = false */ $cfg['QueryHistoryDB'] = true; /** * When using DB-based query history, how many entries should be kept? * * default = 25 */ $cfg ['QueryHistoryMax']= 100; /* * You can find more configuration options in Documentation.html * or here: http://wiki.phpmyadmin.net/pma/Config */ $cfg['LoginCookieValidity'] = 86400; /* * Enables check for latest versions using Javascript on the main * phpMyAdmin page. Possible values are true or false */ $cfg['VersionCheck'] = false; / * Define whether to refresh only parts of certain pages using * Ajax techniques. Applies only where a non-Ajax behavior is possible; * for example, the Designer feature is Ajax-only so this directive does * not apply to it. */ $cfg['AjaxEnable'] = true; /* * Define whether to use GZip output buffering for increased speed in HTTP transfers. */ $cfg['OBGzip'] = true; $cfg['PersistentConnections'] = true; ?>