Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I download mysql-5.6.16-debian6.0-x86_64.deb from official site.
Install using dpkg -i mysql-5.6.16-debian6.0-x86_64.deb
It does create file in /opt/mysql/server-5.6/.

root@ubuntu:~# cd /var/lib/mysql/
bash: cd: /var/lib/mysql/: No such file or directory
root@ubuntu:~$ service mysql start
mysql: unrecognized service
root@ubuntu:~$ chown -R mysql /opt/mysql/server-5.6/
chown: invalid user: mysql
root@ubuntu:~$ chgrp -R mysql /opt/mysql/server-5.6/
chgrp: invalid group: mysql

I don't know how to deal with this...

root@ubuntu:~# ls -l /opt/mysql/server-5.6/
total 152
drwxr-xr-x  2 root root  4096 Mar 12 11:56 bin
-rw-r--r--  1 root root 17987 Jan 14 23:38 COPYING
drwxr-xr-x  2 root root  4096 Mar 12 11:56 docs
drwxr-xr-x  3 root root  4096 Mar 12 11:56 include
-rw-r--r--  1 root root 88109 Jan 14 23:38 INSTALL-BINARY
drwxr-xr-x  3 root root  4096 Mar 12 11:56 lib
drwxr-xr-x  4 root root  4096 Mar 11 16:32 man
drwxr-xr-x 10 root root  4096 Mar 12 11:56 mysql-test
-rw-r--r--  1 root root  2496 Jan 14 23:38 README
drwxr-xr-x  2 root root  4096 Mar 12 11:56 scripts
drwxr-xr-x 28 root root  4096 Mar 12 11:56 share
drwxr-xr-x  4 root root  4096 Mar 12 11:56 sql-bench
drwxr-xr-x  3 root root  4096 Mar 12 11:56 support-files
share|improve this question
    
try sudo service mysql start –  Avinash Raj Mar 12 at 5:05
    
@Avinash Raj root user, mysql: unrecognized service –  Mithril Mar 12 at 5:09
    
post the contents of ls -l /opt/mysql/server-5.6/ –  Avinash Raj Mar 12 at 5:11
    
@Avinash Raj I have updated the question. –  Mithril Mar 12 at 5:13
    
How did you get -bash: cd: /var/lib/mysql/: No such file or directory this error. –  Avinash Raj Mar 12 at 5:15

2 Answers 2

You don't have to do that:

easily you can install mysql:

server:

sudo apt-get install mysql-server

client only

sudo apt-get install mysql-client

If you want newer versions than default in Ubuntu

for version 5.5;

sudo  apt-add-repository ppa:ondrej/mysql-5.5

for version 5.6;

sudo  apt-add-repository ppa:ondrej/mysql-5.6

After adding your needed version, update sources lis:

sudo apt-get update

now install mysql

server:

sudo apt-get install mysql-server

client only

sudo apt-get install mysql-client
share|improve this answer
    
Because 12.04 defaut install mysql 5.5. –  Mithril Mar 12 at 5:05
    
so you need specific version? –  Ask Mar 12 at 5:06
    
yes, I just want to use the newest. –  Mithril Mar 12 at 5:11

If you install mysql server from .deb file, it stores the service file inside /etc/init.d directory as mysql.server.So to start the mysql server service, you have to run the below command,

sudo service mysql.server start

To initialize mysql Data directory, see this documentation page.

share|improve this answer
    
Why there is a downvote for this answer,plz explain me. –  Avinash Raj Mar 12 at 11:01
    
Me and op discussed about this problem on chat –  Avinash Raj Mar 12 at 11:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.