<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Using_MySQL_from_a_Docker_Container_in_Mac</id>
		<title>Using MySQL from a Docker Container in Mac - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Using_MySQL_from_a_Docker_Container_in_Mac"/>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=Using_MySQL_from_a_Docker_Container_in_Mac&amp;action=history"/>
		<updated>2026-06-02T04:19:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://logicwiki.co.uk/index.php?title=Using_MySQL_from_a_Docker_Container_in_Mac&amp;diff=1988&amp;oldid=prev</id>
		<title>AliIybar: Created page with &quot;Category:MySql Category:Docker Category:Mac Pull docker image of MySql 8.0.20   docker pull mysql/mysql-server:8.0.20 List the images   docker images Run the image...&quot;</title>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=Using_MySQL_from_a_Docker_Container_in_Mac&amp;diff=1988&amp;oldid=prev"/>
				<updated>2020-06-03T13:11:22Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:MySql&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:MySql (page does not exist)&quot;&gt;Category:MySql&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Docker&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Docker (page does not exist)&quot;&gt;Category:Docker&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Mac&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Mac (page does not exist)&quot;&gt;Category:Mac&lt;/a&gt; Pull docker image of MySql 8.0.20   docker pull mysql/mysql-server:8.0.20 List the images   docker images Run the image...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:MySql]]&lt;br /&gt;
[[Category:Docker]]&lt;br /&gt;
[[Category:Mac]]&lt;br /&gt;
Pull docker image of MySql 8.0.20 &lt;br /&gt;
 docker pull mysql/mysql-server:8.0.20&lt;br /&gt;
List the images &lt;br /&gt;
 docker images&lt;br /&gt;
Run the image for the first time &lt;br /&gt;
 docker run --name=mysql1 -d mysql/mysql-server:8.0.20&lt;br /&gt;
Bette, run it with port mappings&lt;br /&gt;
 docker run -p 3306:3306 -p 33060:33060 --name=mysql1 -d mysql/mysql-server:8.0.20        including port mapping&lt;br /&gt;
Get running containers&lt;br /&gt;
 docker ps&lt;br /&gt;
Flush it to screen&lt;br /&gt;
 docker logs mysql1&lt;br /&gt;
Get the random password &lt;br /&gt;
 docker logs mysql1 2&amp;gt;&amp;amp;1 | grep GENERATED            to get root password&lt;br /&gt;
Run mysql to change the random password&lt;br /&gt;
 docker exec -it mysql1 mysql -u root -p              &lt;br /&gt;
and enter the password you get with the line above&lt;br /&gt;
 ALTER USER 'root'@'localhost' IDENTIFIED BY 'C1pralex'&lt;br /&gt;
 \go&lt;br /&gt;
 \q    &lt;br /&gt;
Set the permissions of root to accept connection from everywhere: &lt;br /&gt;
&lt;br /&gt;
open bash &lt;br /&gt;
 docker exec -it mysql1 bash &lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 SELECT host, user FROM mysql.user;&lt;br /&gt;
It has to contain a line with your database user and '%' to works (% means &amp;quot;every IP addresses are allowed&amp;quot;). &lt;br /&gt;
update mysql.user set host = '%' where user='root';&lt;br /&gt;
&lt;br /&gt;
 docker stop mysql1&lt;br /&gt;
&lt;br /&gt;
 docker start mysql1&lt;/div&gt;</summary>
		<author><name>AliIybar</name></author>	</entry>

	</feed>