Mysql Question
Comprox
*chortle*Canada Join Date: 2002-01-23 Member: 7Members, Super Administrators, Forum Admins, NS1 Playtester, NS2 Developer, Constellation, NS2 Playtester, Reinforced - Shadow, WC 2013 - Silver, Subnautica Developer, Subnautica Playtester, Pistachionauts
Ok, Im trying to setup some PHP thing at work here, after getting apache, PHP and MySQL running (wooo!), I am trying to install this customer datbase program. It's telling me to run this command:
[johnuser@somehost helpdesk]$mysql -u root -p < phphelpdesk.mysql
Which is fine, if I was running linux, which I am not. So I tried this:
c:\mysql\bin> mysql -u root -p < phphelpdesk.mysql
The system cannot find the file specified.
But, this works
c:\mysql\bin> mysql -u root -p
enter password: *********
Welcome to the blah blah blah...
So, how do I create a database with that name on a window MySQL server? <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
[johnuser@somehost helpdesk]$mysql -u root -p < phphelpdesk.mysql
Which is fine, if I was running linux, which I am not. So I tried this:
c:\mysql\bin> mysql -u root -p < phphelpdesk.mysql
The system cannot find the file specified.
But, this works
c:\mysql\bin> mysql -u root -p
enter password: *********
Welcome to the blah blah blah...
So, how do I create a database with that name on a window MySQL server? <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
Comments
(C is server windows, D: is enpty HD just installed myself)
I don't want to break the entire database for more then a couple hours at most. The most clearcut directions would win someone... kisses?
Exactly, it's much easier to do it that way. Plus you can also modify the tables much faster with it. Here's the site: <a href='http://www.phpmyadmin.net/home_page/downloads.php' target='_blank'>http://www.phpmyadmin.net/home_page/downloads.php</a>
mysql -u root -p -e "create database yourdatabase"
for cyndane I posted this in irc, but I'll put it here too incase other people are interested:
theoreticly you should just have to change the datadir option under [mysqld] in your config file
as an example that section of mine looks like this:
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
so if you just change the datadir location and then just move the files in the old location to the new one, it *should* work. I havnt actualy tried it so <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
DOes this mean the program is using old program code that doesn't work, or I setup MySQL wrong:
Fatal error: Call to undefined function mysql_connect() in C:\techweb\includes\connect.inc.php on line 10
(Don't I need to put some lines in the PHP or Apache config files so it knows to use MySQL, cause the instructions I had never did that)?
Right click on My Computer > Properties > Advanced > Environment Variables > System Variables > Path > Edit > Add "C:\mysql\bin;" to the end of it.
Edit - or wherever you slung the MySQL thing.
I'm having the same problem. I tried adding the MySQL DLLs (php_mysql.dll and php_mysqli.dll) to php.ini under extensions, but when I loaded Apache/PHP it said it couldn't find it (even though it was right there). I did find this comment however:
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->;Note that MySQL and ODBC support is now built in, so no dll is needed for it.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
edit: So basically, I have no idea what to do now. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
OK, that removed my MySQL error.
Now, it's not parsing the PHP files at all. phpinfo(); doesn't even do anything now. And the odd part is, it was working before I tried getting mysql working.
I'm still getting this error:
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->PHP Warning: PHP Startup: Unable to load dynamic library 'j:/program/apache/apa
che/php/ext\php_mysql.dll' - Det gÕr inte att hitta den angivna modulen.
in Unknown on line 0
Apache/1.3.28 (Win32) PHP/5.0.4 running...<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
"Det gÕr inte att hitta den angivna modulen." = "The specified module could not be found". And yes, the file is right there. It also pops up about LIBMYSQL.dll, which is also in the ext folder. And yes, the extension_dir is correct. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
As for brute force, did you change it to extension_dir = "ext/" and not extension_dir = "ext\"? Could be because you used the wrong slash.
Nope, it's the same no matter if I use ext, ext/ or ext\
Sigh. Strange thing is, it used to work like a month ago.
<a href='http://www.mysql.com/products/administrator/' target='_blank'>http://www.mysql.com/products/administrator/</a>
easy create/delete databases
easy create/delete/assign users
easy backup and restore databases (what you are trying to do)
monitor mysql connections and more