- Joined
- May 23, 2009
- Messages
- 176
- Reaction score
- 46
Hi guys , this is not a really "big tutorial" but I really believe that can be useful for people who are starting with Ubuntu/FW server. So here we go
1)You need to install mysql-server
2)Then you will need to enable remote connections (in my opinion is better than install phpmyadmin :
But first you will need to know your ip , lets run a ifconfig
As you see my ip is 10.0.0.19
Now we need to run this in the terminal :
And look for this :
replace bind-adress with your details , as we know my ip in this case is 10.0.0.19
Press Control+O to save
Press Enter to save
Now press Control+Z to exit from this editor
3)Now you need to create a new user(is safer than using root because it will prevent future hacking tries, when user is unknow and root only can connect from localhost)
For do this , we need to login to the db using the terminal :
It will ask us for the password we set when we installed mysql
In the mysql console , lets first create an user :
You need to know that @% mean any host , but if you want only to allow the user to connect from an specific host you can do this
Then press enter and you will receive this msg :
Now we need to create that "powerful" user thats mean able to create,edit,delete databases , tables , users , etc..
So we need to run this :
Then , lets flush privileges and we are finish
4) We can connect from any host to the mysql server and we got an user , not lets create the db and import the tables :laugh:
We can use any db editor such as navicat but I preffer SQLyog , you can download it for free at
Now lets create the db
And lets go to restore the database :
Db :
Press "Yes"
Result :
We are done with the database . I hope this can help people who are starting or people who are installing it in a dedicated server and dont trust in phpmyadmin :closedeyes:
ps : I am sorry If i have any english mistakes , my mother language is Spanish:blush:
1)You need to install mysql-server
Code:
apt-get install mysql-server
2)Then you will need to enable remote connections (in my opinion is better than install phpmyadmin :
But first you will need to know your ip , lets run a ifconfig
As you see my ip is 10.0.0.19
Now we need to run this in the terminal :
Code:
nano /etc/mysql/my.cnf
And look for this :
replace bind-adress with your details , as we know my ip in this case is 10.0.0.19
Press Control+O to save
Press Enter to save
Now press Control+Z to exit from this editor
3)Now you need to create a new user(is safer than using root because it will prevent future hacking tries, when user is unknow and root only can connect from localhost)
For do this , we need to login to the db using the terminal :
Code:
mysql -u root -p
It will ask us for the password we set when we installed mysql
In the mysql console , lets first create an user :
Code:
CREATE USER 'user_test'@'%' IDENTIFIED BY 'ragezone';
You need to know that @% mean any host , but if you want only to allow the user to connect from an specific host you can do this
Code:
CREATE USER 'user_test'@'here_goes_the_ip' IDENTIFIED BY 'ragezone';
Then press enter and you will receive this msg :
Now we need to create that "powerful" user thats mean able to create,edit,delete databases , tables , users , etc..
So we need to run this :
Code:
GRANT ALL PRIVILEGES ON *.* TO 'user_test'@'%' WITH GRANT OPTION;
Then , lets flush privileges and we are finish
4) We can connect from any host to the mysql server and we got an user , not lets create the db and import the tables :laugh:
We can use any db editor such as navicat but I preffer SQLyog , you can download it for free at
You must be registered to see links
Now lets create the db
And lets go to restore the database :
Db :
You must be registered to see links
or see attachedPress "Yes"
You must be registered to see links
Result :
We are done with the database . I hope this can help people who are starting or people who are installing it in a dedicated server and dont trust in phpmyadmin :closedeyes:
ps : I am sorry If i have any english mistakes , my mother language is Spanish:blush:
Attachments
You must be registered for see attachments list