Re: Connect to mysql?



Could you try next thing:

cd C:\Program Files\MySQL\MySQL Server 5.0\bin
mysql -h localhost -u root -p

use mindb

GRANT ALL PRIVILEGES ON *.* TO 'ODBC'@'localhost' IDENTIFIED BY 'yourpass' WITH GRANT OPTION;


news.telia.net wrote:
Hi!

I have a question. I have installed php and mysql on an apache-server on
windows and I can't connect to the server.

I tried to create a database (since I am trying to learn howto). My manual
said I should write this at the shell:
c:\mysql\bin>mysqladmin -u root creare mindb

I did this and got this error:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I then tried to use -p and wrote this instead:
c:\mysql\bin>mysqladmin -p -u root creare mindb

The database was created!

Then I tried to write mysql in cmd at c:\mysql\bin but I get this error:
Access denied for user 'ODBC'@'localhost' (using password: No)

Why??

I have used earlier versions of mysql and php and got it to work. In earlier
versions "my.ini" looks very different and user and password were written
there, but not anymore. Why, or is it me who have done something wrong? When
I log in to phpmyadmin I have to root-accounts there, one with
host=localhost and one the host=%.

All I want, is to make mysql work, so I can test things and to learn!

Thanks
Cassandra

My configuration


Windows XP pro

Netgear router (I have opened port 3306)

ADSL

no-ip (For my domain, www.kamrate.se)


Apache 2.2.2

The exe-files are in c:\apache2\bin

(All I did was to fill in domain=localhost, servername=localhost and my
email)


PHP 5.1.4

The exe-files are in c:\php

(I used the zip package)


httpd.conf

At the row below "#LoadModule ssl_module modules/mod_ssl.so" I wrote:

LoadModule php5_module "c:/php/php5apache2_2.dll


At the row below "AddType application/x-gzip .gz .tgz" I wrote:

AddType application/x-httpd-php .php


At the row below "DocumentRoot" I wrote:

PHPIniDir "C:/php"


At the row below "DocumentRoot" I wrote:

PHPIniDir "C:/php"


At the row "DirectoryIndex index.html" I wrote:

DirectoryIndex index.htm index.html index.php


php.ini

Changed "doc_root" to:

c:\Apache2\htdocs


Created a tmp-folder in:

c:\apache2\ and wrote the path in session.save_path:

c:\apache2\tmp


Saved php.ini in:

c:\php


I did restart apache and tested php and it worked!


Mysql 5.0.22

The exe-files are in c:\mysql\bin


Removed earlier versions of mysql, including the folder:

c:\mysql


I did choose to run "Configuration Wizard" and did choose a password for
root.


PhpMyAdmin

Installationfolder is "c:\apache2\htdocs"

I wrote host=localhost, user=root and password in config.inc.php.


php.ini

I removed the ; before "extension=php_mysql.dll"

I removed the ; before "extension=php_mbstring.dll"


At the row "extension_dir" I wrote:

extension_dir="c:\php\ext"


I copied libmysql.dll in c:\mysql\bin to:

c:\apache2\bin


I did restart apache and tested to surf to http://localhost/phpmyadmin and
it worked!






.



Relevant Pages

  • Re: Datenbank von "Aussen" erreichen ?
    ... > auf einem Server - per rpm oder gleich mittels Yast oder apt-get. ... > Nach dem Handbuch ist der System Root nicht der mySQL Root. ... > should assign passwords to the accounts created by mysql_install_db. ...
    (de.comp.datenbanken.mysql)
  • Re: Speed up web pages : MySQL or PHP solutions ?
    ... People come to us to view 1 image or text + 1 PHP content. ... Can you click on the image = MYSQL ... Make your content cacheable by sending appropriate HTTP headers. ... Cache content on the server to avoid re-creation over and over again, ...
    (comp.lang.php)
  • Executing PHP files on remote web server
    ... We have a web app which uses PHP and MySQL on our in-house Apache web ... database to the web host because a lot of the data is sensitive. ... By loading the non-sensitive data into the web host's MySQL tables, ... running on our own web server. ...
    (comp.lang.php)
  • Re: Newbie Security Questions
    ... questions about PHP and its usage with MySQL. ... And even if they do, its a strange Mysql server that is sitting on the internet accepting requests from all and sundry..normally you run them on a local network, or the same box and set mysql to only accept requests FROM the apache server.. ... You have to layer that over the top using cookies and user logins if you want it. ...
    (comp.lang.php)
  • Re: Server load too high
    ... > the new dedicated server with Dual Xeon 3.2 GHz and 2GB Ram. ... > The board is written in PHP with Mysql. ... Well, since it looks like MySQL is eating more of the CPU, it could be ... In any case, I've been using PHP5 for a while now, and I've not ...
    (comp.lang.php)