Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
ok, im trying to create a databse using mysql and im having some problems. i really have no idea how to fix them but here it is. i cant do anything with the mysqladmin program thingy and here's the output that i get who i try:
C:\Program Files\EasyPHP1-7\mysql\bin>mysqladmin/create yahoo
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'ODBC@localhost' (Using password: NO)'as you can see its quite retarded. i dont know if there's a file that i have to mess with or what. i have turned off my firewall and that didnt help. and yes, this database and website will be hosted locally.
could you help me out with this?FBI Agent
AIM: EliteAssassin187

I run MySQL on Win2k Pro... here is what I do to create a DB. (be sure you have daemon running)
c:\mysql\bin\mysqld
c:\mysql\bin\mysql
mysql> create database MyDBName;
mysql> create table MyTABName ( ... );I don't use the mysqladmin stuff. If there is still a problem with it, check the permissions / grants for the user you are using to make the DB.

ok, first off, what's daemon? second, when i try and run mysql in DOS it comes up with the same error as above, and the above error happens on every mysqladmin-command that i try and do.
im thinking its a config file or something in an incorrect location/ created incorrectly.
could you help me out with that?FBI Agent
AIM: EliteAssassin187

I believe that your error is happening because the mysql daemon (mysqld) is not running. The mysql daemon is the program that makes the database work. If the daemon is not running, nothing will work.
The daemon (mysqld) should be located in the bin directory of whereever mysql is installed on your system (c:\mysql\bin on IRs system).
As IR said, the first thing to always do is make sure the daemon is running. If it's not, run:
c:\mysql\bin\mysqld
At this point (assuming it starts fine) you can run mysqladmin or mysql. 'mysqladmin' and 'mysql' are both client programs, meaning that they connect to the mysql server (another term for mysql daemon - mysqld). The clients send commands to the server and receive results. mysqladmin is a browser based program that lets you do things without knowing the SQL that mysql uses to actually do the action. 'mysql' is a command line based program where you type in commands.I prefer to use 'mysql'. To use it requires that you learn SQL, but you'll need to learn that to use mysql in your programs. The extra commands like 'create database' and 'create table' that you'd need to use 'mysql' aren't that big a deal. And in the end, you'll have much more flexibility.
I've never run mysql on anything but Linux, so I can't help with config files or how to set up mysql so that it starts automatically when you boot the PC.

ok, well i got an idea. since the problem seems to be some type of config file. could someone send a config file template type thing and tell me where it goes and stuff.
this is by far the hardest thing with my webserver ;-)
FBI Agent
AIM: EliteAssassin187

Nobody is mentioning config files except for you.
Have you verified if 'mysqld' is running or not?
If 'mysqld' is not running, when you try to start it, do you get errors in the log file??
'mysqld' (the database server) has to be running before you can do anything else related to mysql.
If you can't answer these questions, then you need to go back to the docs about "running mysql" and learn how to answer these questions.
If you were doing this on linux, I could help, but don't know the specifics of how this is done or where the logfiles are on WinXP. Perhaps, IR can help with that.

well obviously i have mysqld running. i read what people say. so i think its about the configs because... well yeah, its running. so i guess you cant really help me. thanks anyway though. you did tell me about that mysqld, so that was cool.
FBI Agent
AIM: EliteAssassin187

well obviously i have mysqld running. i read what people say.
well im done talking about mysqld since thats not the problem. if you dont mind i'd like to get to the problem
FBI Agent
AIM: EliteAssassin187

i have just set up a server, had exactly the same problem
try using the username root with no password
i solved my problem by using windows 2000 as the server, rather than Xp. dont ask why, but i think its because XP is fussy with binding to NICS.
anyway if your running it on XP...

Since you have the mysqld running...
The problem good be in the script where you are connecting to the database.
'ODBC@localhost' (Using password: NO)'
Make sure you have a user called ODBC and make sure that you have a password set for it.
For instance:
$connection = mysql_connect("localhost", "username","password") or die ("Unable to connect!");If you are not using a script and trying to make a database, etc straight from the command prompt using mysqladmin:
1) Make sure the user you are using has admin priveleges.
2) type: mysqladmin create yahoo (drop the /)Try those, let me know... if problem still exists throw me some more details, and if a script is being used... paste it in.
IR

Didn't see Jamie's post until I posted my reply above... Its based on your configuration, as to whether or not passwords are required and such during connections. Avoid logging in under a root account if possible. Create new account and grant it only the roles / privileges that are needed.

well i took the mySQL book back to the library which told me how to create users and stuff so i dont know any of that. this is what i have in this config file which im sure is being executed each time it runs.
# Example mysql config file.
# Copy this file to c:\my.cnf to set global options
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options# This will be passed to all mysql clients
[client]
#password=PASSWORD
port=3306
#socket=MySQL# Here is entries for some specific programs
# The following values assume you have at least 32M ram# The MySQL server
[mysqld]
skip-innodb
bind-address=127.0.0.1
port=3306
#socket=MySQL
skip-locking
set-variable = key_buffer=16K
set-variable = max_allowed_packet=1M
set-variable = thread_stack=64K
set-variable = table_cache=4
set-variable = sort_buffer=64K
set-variable = net_buffer_length=2K
server-id = 1# Uncomment the following if you want to log updates
log-bin# Uncomment the following rows if you move the MySQL distribution to another
# location
basedir = C:/Program Files/EasyPHP1-7/mysql/
datadir = C:/Program Files/EasyPHP1-7/mysql/data/
# Uncomment the following if you are NOT using BDB tables
#skip-bdb# Uncomment the following if you are using Innobase tables
#innodb_data_file_path = ibdata1:100M
#innodb_data_home_dir = c:\ibdata
#innodb_log_group_home_dir = c:\iblogs
#innodb_log_arch_dir = c:\iblogs
#set-variable = innodb_mirrored_log_groups=1
#set-variable = innodb_log_files_in_group=3
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#innodb_log_archive=0
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
#set-variable = innodb_file_io_threads=4
#set-variable = innodb_lock_wait_timeout=50[mysqldump]
quick
set-variable = max_allowed_packet=16M[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
safe-updates[isamchk]
set-variable = key_buffer=8M
set-variable = sort_buffer=8M[myisamchk]
set-variable = key_buffer=8M
set-variable = sort_buffer=8M[mysqlhotcopy]
interactive-timeoutNOTE: obviously the # is a comment
FBI AgentAIM: EliteAssassin187

it sounds like a basic password issue.
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'ODBC@localhost' (Using password: NO)'remember.. their is no default mysql root password. did you change the root/admin password?
i think the command line is:
mysqladmin -u root -p mypassword
A+ Certified

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |