1 Replies - 6936 Views - Last Post: 07 February 2012 - 04:35 PM

#1 nengiwizzy2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 10-January 12

How do I add a host to the host table” using MySQL Command Line Client

Posted 22 January 2012 - 09:49 AM

Am knew to MySQL, using MySQL Server 5.0
1. How do I
a) Create a host table
B) “Add a host to the host table” using MySQL Command Line Client
2. How do I locate “MySQL ADMIN” and also create a database using mysqladmin.
Is This A Good Question/Topic? 0
  • +

Replies To: How do I add a host to the host table” using MySQL Command Line Client

#2 Misfit  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 100
  • Joined: 18-July 09

Re: How do I add a host to the host table” using MySQL Command Line Client

Posted 07 February 2012 - 04:35 PM

I'm assuming your concerns with #1 are due to errors you're getting as you log into the server with virtually the same creds with in different places. This is not a fault of the supposed/obsolete "hosts" table (if you're curious where this lies, try the mysql database - not the server, but the database itself - http://dev.mysql.com...-structure.html ). This is how MySQL handles users - it logs them with respect to their host.

If this is the case, run the following query:

GRANT ALL PRIVILEGES ON YOUR_DATABASE_NAME_HERE.* TO 'YOUR_USER_NAME_IN_THESE_QUOTES_HERE'@'THE_HOST_YOU\'RE_CONNECTING_FROM_HERE' IDENTIFIED BY 'YOUR_DESIRED_PASSWORD_HERE';



Not really sure why you'd want to try using mysqladmin for this. You're going to have to log into your MySQL server either way, but here's a quick rundown.

mysqladmin -uroot -p command create YOUR_DB_NAME_HERE

I personally would stick to:

mysql -uroot -p
CREATE DATABASE database_name;

This post has been edited by Misfit: 07 February 2012 - 04:37 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1