store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Sun Aug 18, 2019 2:52 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [RESOLVED]MariaDB can not create DB (beginer ...)
Unread postPosted: Fri Sep 26, 2014 5:58 pm 
Offline
New Forum User
New Forum User

Joined: Fri Sep 26, 2014 5:45 pm
Posts: 4
Location: Muret
Hello,

I am on ubuntu 14.04 and I have great problems to start using mariaDB, maybe because I'm new user.

I have installed Mariadb and no passwords creation or whatever was asked to me. But, I think it is well installed because I can start it with the following command :
Code:
kimilie@kimilie-MS-7816:~$ sudo service mysql start
[sudo] password for kimilie:
 * Starting MariaDB database server mysqld                               [ OK ]


At first, I wanted to create a database by using terminal with the following command :
Code:
kimilie@kimilie-MS-7816:~$ CREATE DATABASE database;
CREATE: command not found
kimilie@kimilie-MS-7816:~$


But as you can see, it is not possible for me ....

So, I have installed PHPmyAdmin in order to create this DB ... but PhpMyAdmin always asks me username and password that I do not have because It was not asked to me to create password ! So I do not have one ....

I have rode the MariaDB documentation (first step) but it is also asked for pwd ... as you can see here : https://mariadb.com/kb/en/mariadb/documentation/getting-started/a-mariadb-primer/a-mariadb-primer-02-logging-in/
What can I do please ? I really want to go ahead with those problems but it seems it's too hard for me, I cannot understand why It's asked me a pwd when I never created one ?!?

:roll:

Thank you !


Last edited by kimilie on Sat Sep 27, 2014 2:45 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: MariaDB can not create DB (beginer ...)
Unread postPosted: Sat Sep 27, 2014 12:18 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 8329
Location: earth
You need to log into mysql:

Code:
mysql -u root


and the run your mysql commands

Code:
CREATE DATABASE database;


Top
 Profile  
Reply with quote  
 Post subject: Re: MariaDB can not create DB (beginer ...)
Unread postPosted: Sat Sep 27, 2014 12:21 pm 
Offline
New Forum User
New Forum User

Joined: Fri Sep 26, 2014 5:45 pm
Posts: 4
Location: Muret
Hello !

Thank you for your reply.

When I try to connect via root user, I get this error :
Code:
kimilie@kimilie-MS-7816:~$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")


Thank you for your help !

:cry:


Top
 Profile  
Reply with quote  
 Post subject: Re: MariaDB can not create DB (beginer ...)
Unread postPosted: Sat Sep 27, 2014 1:29 pm 
Offline
New Forum User
New Forum User

Joined: Fri Sep 26, 2014 5:45 pm
Posts: 4
Location: Muret
Hello,

Thank you for your reply !

I tried this code but got an error :

Code:
kimilie@kimilie-MS-7816:~$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")


It's really hard for me to connect when I do not have a password. In fact, no passwords were asked me to create during the install ....
:cry:


Top
 Profile  
Reply with quote  
 Post subject: Re: MariaDB can not create DB (beginer ...)
Unread postPosted: Sat Sep 27, 2014 2:44 pm 
Offline
New Forum User
New Forum User

Joined: Fri Sep 26, 2014 5:45 pm
Posts: 4
Location: Muret
Hello out there !

My problem is solved !

Here is the way I've solved the problem :

Code:
kimilie@kimilie-MS-7816:/$ sudo /etc/init.d/mysql stop
 * Stopping MariaDB database server mysqld                                                                                                       [ OK ]
kimilie@kimilie-MS-7816:/$ sudo mysqld_safe --skip-grant-tables --skip-networking &
[1] 4724
kimilie@kimilie-MS-7816:/$ 140927 20:15:56 mysqld_safe Logging to syslog.
140927 20:15:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

#plus de kimilie@… ; donc écrire direct sans attendre

mysql mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.0.13-MariaDB-1~trusty-log mariadb.org binary distribution

Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mysql]>update user set password=password('M4c4D4M*') where user="root" and host="localhost";
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [mysql]> exit
Bye
kimilie@kimilie-MS-7816:/$ sudo /etc/init.d/mysql start
 * Starting MariaDB database server mysqld                                                                                                       [ OK ]
kimilie@kimilie-MS-7816:/$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.0.13-MariaDB-1~trusty-log mariadb.org binary distribution

Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>


Enjoy !!!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group