<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=MYSQL_Install</id>
	<title>MYSQL Install - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=MYSQL_Install"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=MYSQL_Install&amp;action=history"/>
	<updated>2026-06-04T21:34:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=MYSQL_Install&amp;diff=26244&amp;oldid=prev</id>
		<title>Chao at 10:40, 1 May 2020</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=MYSQL_Install&amp;diff=26244&amp;oldid=prev"/>
		<updated>2020-05-01T10:40:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Install ==&lt;br /&gt;
Prerequisites&lt;br /&gt;
* wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb&lt;br /&gt;
* full list at http://repo.mysql.com/ latest version could be found as [FILE] mysql-apt-config_0.8.15-1_all.deb 20-Feb-2020 08:55    35k  &lt;br /&gt;
* sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb&lt;br /&gt;
And start to install &lt;br /&gt;
* apt-get install mysql-server&lt;br /&gt;
Post-config&lt;br /&gt;
* Run set-up script - mysql_secure_installation&lt;br /&gt;
* connector: python -m pip install mysql-connector&lt;br /&gt;
&lt;br /&gt;
* enter into mysql: mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
* '''sudo apt-get install mysql-server'''&lt;br /&gt;
* '''sudo mysql_secure_installation''' -&amp;gt; after set root pass, all the rest set to Y&lt;br /&gt;
or &lt;br /&gt;
* apt-get install mysql-server mysql-client&lt;br /&gt;
You will be asked to provide a password for the MySQL root user - this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
=== Remote Access ===&lt;br /&gt;
* Allow remote access: nano /etc/mysql/my.cnf: bind-address = 127.0.0.1 change to  bind-address = 0.0.0.0&lt;br /&gt;
* Or just comment is # bind-address = 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
* sudo ufw allow mysql&lt;br /&gt;
&lt;br /&gt;
* create new remote user:&lt;br /&gt;
 CREATE USER 'hechao'@'localhost' IDENTIFIED BY 'password_here';&lt;br /&gt;
 GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 CREATE USER 'hechao'@'%' IDENTIFIED BY 'password_here';&lt;br /&gt;
 GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'WITH GRANT OPTION;&lt;br /&gt;
* OR&lt;br /&gt;
 grant all privileges on *.* to 'root'@'%' identified by 'password';&lt;br /&gt;
 flush privileges;&lt;br /&gt;
* Where first * is database, second * is tables, monty is login name, % for any ip address&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting MySQL Support In PHP5 ===&lt;br /&gt;
To get MySQL support in PHP, we can install the php5-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:&lt;br /&gt;
 apt-cache search php5&lt;br /&gt;
Pick the ones you need and install them like this:&lt;br /&gt;
 apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl&lt;br /&gt;
Xcache is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and APC. It is strongly recommended to have one of these installed to speed up your PHP page.&lt;br /&gt;
&lt;br /&gt;
Xcache can be installed as follows:&lt;br /&gt;
 apt-get install php5-xcache&lt;br /&gt;
&lt;br /&gt;
and let's restart the php by doing:&lt;br /&gt;
 service php5-fpm restart&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Now we should see many extra modules you installed in the phpinfo.php, including the mysql.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Php-mysql.png|400px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-lemp-on-ubuntu-12.04-lts reference]&lt;br /&gt;
&lt;br /&gt;
[[category: MYSQL]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>