<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>adminer Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/adminer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sun, 17 Nov 2019 23:19:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Deploy MySQL using Docker Compose</title>
		<link>https://www.osradar.com/deploy-mysql-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-mysql-using-docker-compose/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 20 Nov 2019 23:18:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[adminer]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15624</guid>

					<description><![CDATA[<p>Hello. In this post, I will teach you how to deploy MySQL using Docker compose. It will be brief but explained step by step. Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-mysql-using-docker-compose/">Deploy MySQL using Docker Compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Hello. In this post, I will teach you how to deploy MySQL using Docker compose. It will be brief but explained step by step.</strong></p>
<p>Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images that we will be able to use in any supported system thanks to the technology of containers. Then,<strong> these steps can be done from any Linux distribution that has installed </strong><a href="https://www.osradar.com/tag/docker/" target="_blank" rel="noreferrer noopener" aria-label="ocker  (opens in a new tab)"><strong>Docker </strong></a><strong>and Docker Compose.</strong></p>
<p>Remember that it is always possible to install MySQL on a server using your precompiled packages, we can easily have the latest version available.</p>
<p>For this tutorial, apart from MySQL, we will also deploy <a href="https://www.osradar.com/install-adminer-debian-10/" target="_blank" rel="noopener noreferrer">Adminer that we talked about earlier</a>. Together you will be able to manage a MySQL server without problems.</p>
<p>So let&#8217;s get to work.</p>
<h2>Install Docker and Docker Compose on Linux</h2>
<p>The first step is to have Docker installed in the system, obviously.</p>
<ul>
<li>If you are using Ubuntu: <a href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank" rel="noreferrer noopener">How to install Docker on Ubuntu 18.04?</a></li>
<li>For CentOS 8: <a href="https://www.osradar.com/install-docker-centos-8/" target="_blank" rel="noreferrer noopener">How to install Docker on CentOS 8?</a></li>
<li>For CentOS 7: <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank" rel="noreferrer noopener">How to install Docker CE on CentOS 7?</a></li>
<li>If you use Windows: <a href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank" rel="noreferrer noopener">How to install Docker in Windows 10?</a></li>
<li>Or, if you are using Debian 10: <a href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank" rel="noreferrer noopener">How to install Docker on Debian 10?</a></li>
</ul>
<p>And using your distribution’s package manager, you can install Docker Compose. For example:</p>
<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>
<p>For Debian, Ubuntu and derivatives.</p>
<pre class="wp-block-preformatted">:~$ sudo dnf install docker-compose</pre>
<p>Or, for RHEL, CentOS and derivatives.</p>
<h2>Deploy MySQL using Docker Compose</h2>
<p>Well, it&#8217;s time to work. First create a folder called mysql and access it.</p>
<pre>:~$ mkdir mysql<br />:~$ cd mkdir</pre>
<p>Inside it, we will create the docker compose file called <code>docker-compose.yml</code>.</p>
<pre>:~$ nano docker-compose.yml</pre>
<p>Once you have created the file, you need to add the following content:</p>
<pre>version: '3.1'<br /><br />services:<br /><br />  db:<br />    image: mysql:latest<br />    command: --default-authentication-plugin=mysql_native_password<br />    restart: always<br />    environment:<br />      MYSQL_ROOT_PASSWORD: angelo123<br />      MYSQL_DATABASE: example<br />      MYSQL_USER: angelo<br />      MYSQL_PASSWORD: angelo123<br />    volumes:<br />      /home/angelo/mysqldata:/var/lib/mysql<br /><br />  adminer:<br />    image: adminer<br />    restart: always<br />    ports:<br />      - 8080:8080</pre>
<figure id="attachment_15687" aria-describedby="caption-attachment-15687" style="width: 870px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15687" src="https://www.osradar.com/wp-content/uploads/2019/11/1-12.png" alt="1.- Docker compose file to deploy MySQL" width="870" height="445" srcset="https://www.osradar.com/wp-content/uploads/2019/11/1-12.png 870w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-300x153.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-768x393.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-696x356.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-821x420.png 821w" sizes="(max-width: 870px) 100vw, 870px" /><figcaption id="caption-attachment-15687" class="wp-caption-text">1.- Docker compose file to deploy MySQL</figcaption></figure>
<p>I now proceed to explain briefly.</p>
<p>First, we deploy a service called db that contains the information to install MySQL. First, we use the image of the latest version of MySQL. Inside the environment section we define the necessary variables to start the service. In this section, you define things<strong> like the password of the root user, the regular user and the user name as well as the name of the initial database.</strong></p>
<p>An important aspect is the volume that allows us to have access to the database in the host system. This folder must be created before the execution of the file.</p>
<p>In the end, we deploy Adminer using port 8080, obviously you can change this.</p>
<p>So, create the volume folder:</p>
<pre>:~$ mkdir /home/angelo/mysqldata</pre>
<p>Then, run Docker Compose.</p>
<pre>:~$ sudo docker-compose up -d</pre>
<figure id="attachment_15688" aria-describedby="caption-attachment-15688" style="width: 1039px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15688" src="https://www.osradar.com/wp-content/uploads/2019/11/2-12.png" alt="2.- Deploy MySQL using Docker compose" width="1039" height="716" srcset="https://www.osradar.com/wp-content/uploads/2019/11/2-12.png 1039w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-300x207.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-768x529.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-1024x706.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-696x480.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-609x420.png 609w" sizes="(max-width: 1039px) 100vw, 1039px" /><figcaption id="caption-attachment-15688" class="wp-caption-text">2.- Deploy MySQL using Docker compose</figcaption></figure>
<p>So, now you can open your favorite web browser and go to <code>http://your-server:8080</code> to access Adminer. Remember that port has to be open in the firewall.</p>
<figure id="attachment_15689" aria-describedby="caption-attachment-15689" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15689" src="https://www.osradar.com/wp-content/uploads/2019/11/3-11.png" alt="3.- Adminer Working" width="1366" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/3-11.png 1366w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-858x420.png 858w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-15689" class="wp-caption-text">3.- Adminer Working</figcaption></figure>
<p>Now, type in your MySQL credentials and log in. These are the ones we define in the Docker compose file.</p>
<figure id="attachment_15690" aria-describedby="caption-attachment-15690" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15690" src="https://www.osradar.com/wp-content/uploads/2019/11/4-9.png" alt="4.- MySQL running using Docker Compose" width="1366" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/4-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-858x420.png 858w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-15690" class="wp-caption-text">4.- MySQL running using Docker Compose</figcaption></figure>
<p>And that is it.</p>
<h2>Conclusion</h2>
<p>Docker is a technology with enormous potential. It helps a lot in the deployment of applications without many dependency problems. Today in this tutorial we have deployed MySQL and Adminer without many problems.</p>
<p>For more information about the use of the MySQL image, please consult the <a href="https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/docker-mysql-more-topics.html" target="_blank" rel="noopener noreferrer">official documentation.</a></p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-mysql-using-docker-compose/">Deploy MySQL using Docker Compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/deploy-mysql-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
