title: Mysql installation on docker container
body: <p>I am trying to run mysql into modified ubuntu image which includs installation of  Node.js and basic mysql installation using below docker file</p>
  
  <pre><code># Memcached
  
  # use the ubuntu base image provided by dotCloud
  FROM ubuntu/mysqlbase
  MAINTAINER Hitesh
  
  # make sure the package repository is up to dat//e
  #RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" &gt; /etc/apt/sources.list
  #RUN apt-get update
  
  #RUN apt-get install -y mysql-client
  #ENTRYPOINT ["wc", "-l"]
  #ENTRYPOINT ["echo", "running"]
  ENTRYPOINT mysqld_safe &amp; sleep 10
  #RUN mysql
  RUN echo "[mysqld]"                       &gt;/etc/mysql/conf.d/docker.cnf
  RUN echo "bind-address   = 0.0.0.0"      &gt;&gt;/etc/mysql/conf.d/docker.cnf
  RUN echo "innodb_flush_method = O_DSYNC" &gt;&gt;/etc/mysql/conf.d/docker.cnf
  RUN echo "skip-name-resolve"             &gt;&gt;/etc/mysql/conf.d/docker.cnf
  RUN echo "init_file = /etc/mysql/init"   &gt;&gt;/etc/mysql/conf.d/docker.cnf
  RUN echo "GRANT ALL ON *.* TO root@'%'" &gt;/etc/mysql/init
  
  USER root
  
  EXPOSE 3306
  </code></pre>
  
  <p>On running this server using below command</p>
  
  <pre><code>sudo docker run -p 3306:13306 mysql/dockerfiletest
  </code></pre>
  
  <p>Following error was encountered</p>
  
  <pre><code>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  </code></pre>
  
  <p>Can some one please suggest what is needed to be changed here. I want to use this container to be linked with other container which is essentially running my node.js app.</p>