[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

Installed mysql on windows 2000 but cannot execute mysql_install_db

Hi,
I am only starting to pick up sql but having trouble getting started.
I am using Windows 2000 and i downloaded and installed mysql-5.0.0a-alpha-win. I leave the installation directory as c:\.
I go to the scripts\ directory and try and run mysql_install_db script but instead i get the error:
'mysql_install_db' is not recognized as an internal or external command,operable program or batch file.

I try and start the server anyway using mysqld and it starts but when i do mysqlshow there is no mysql database.

Can someone tell me what i am doing wrong?
0
moronmaster
Asked:
moronmaster
  • 2
  • 2
1 Solution
 
gruntarCommented:
What error tells you is that there is no such command. if you installed your Mysql than you execute WinMySQLadmin and you can start using mysql.

Here you will find some more info http://www.devside.net/web/server/windows/mysql

Regards
0
 
moronmasterAuthor Commented:
Well, I can already start the server.
But i believe the manual states that the user database is stored in the "mysql" database and when i use mysqlshow that database doesn't exist so i can't use it yet since i can't create any users.
The manual also states that to create the required initial database "mysql" i need to run the mysql_install_db script but i cannot figure out how to execute it since it is not a standard windows executable.

Do i need to manually create the "mysql" database when setting up mysql on win 2000?
0
 
UmeshCommented:
Hi,

[Taken from NET]

On Windows, the data directory and the grant tables do not have to be
 created. MySQL Windows distributions include the grant tables already set up
 with a set of preinitialized accounts in the @code{mysql} database under the
-data directory.  However, you should assign passwords to the accounts.
+data directory. You do not run the @command{mysql_install_db} script that
+is used on Unix.  However, you should assign passwords to the accounts.
 The procedure for this is given in @ref{Default privileges}.

Take a look at here on how to create users in mysql

http://dev.mysql.com/doc/mysql/en/Adding_users.html


>>>>>Well, I can already start the server.
But i believe the manual states that the user database is stored in the "mysql" database and when i use mysqlshow that database doesn't exist so i can't use it yet since i can't create any users.
The manual also states that to create the required initial database "mysql" i need to run the mysql_install_db script but i cannot figure out how to execute it since it is not a standard windows executable.

If you have tried running mysqlshow/show databases & its not showing then u have to uncomment the line skip-show-databases in the my.ini/my.cnf file..



>>>Do i need to manually create the "mysql" database when setting up mysql on win 2000?
No, this will be created automatically on windows(if u have instaled using any installers)..


Hope This Helps!

0
 
gruntarCommented:
Initial databases areinstalled so you can start using database right away. To see what databases are created open command prompt -> change dir (eg C:\mysql\bin) -> type mysql (you'll se welcome message) then type show databases; (now you shall se all databases)

To create a new user (default user is root). Below you have some options to create and grant privileges.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'
    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'%'
    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO 'user'@'localhost';

Hope that helps.
0
 
moronmasterAuthor Commented:
probably messed up the installation or something. I uninstalled it and reinstalled it following the steps provided in the link and now i can find the 'mysql' database and i can add and delete users.  Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now