Mysql Question

ComproxComprox *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
edited May 2005 in Off-Topic
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-->

Comments

  • CyndaneCyndane Join Date: 2003-11-15 Member: 22913Members
    I was just going to post an issue as well. While comproxy is getting his thing answered. Anyone care to tell me how hard/easy it is to move a database from the C: to D:, on a networked system?

    (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?
  • twoflowtwoflow Singing Drunk Join Date: 2002-11-01 Member: 1950Members, Constellation
    Can you not just run PHPMyAdmin if you've got Apache working?
  • tuemmykidstuemmykids Join Date: 2003-09-15 Member: 20884Members
    <!--QuoteBegin-twoflow+May 5 2005, 01:55 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (twoflow @ May 5 2005, 01:55 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Can you not just run PHPMyAdmin if you've got Apache working? <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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>
  • StoneToadStoneToad Join Date: 2002-11-02 Member: 4053Members, Constellation
    to create the database all you need to do is

    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-->
  • ComproxComprox *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
    edited May 2005
    Well, I got the table made (thanks Stonetoad!), but Im running into more errors. This program appears outdated and confusing, maybe Ill just find a new one instead...

    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)?
  • twoflowtwoflow Singing Drunk Join Date: 2002-11-01 Member: 1950Members, Constellation
    edited May 2005
    You need to add it to your PATH environment variable, don't you?

    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.
  • ComproxComprox *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
    Sadly, nope. I think I need to put some command in either the apache config or PHP config files to tell it MySQL is there, but can't seem to find the info I am looking for.
  • brute_forcebrute_force Join Date: 2003-10-04 Member: 21433Members, Constellation
    edited May 2005
    <!--QuoteBegin-Comprox+May 5 2005, 10:14 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Comprox @ May 5 2005, 10:14 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Sadly, nope. I think I need to put some command in either the apache config or PHP config files to tell it MySQL is there, but can't seem to find the info I am looking for. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    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-->
  • tuemmykidstuemmykids Join Date: 2003-09-15 Member: 20884Members
    All I did was remove the ; infront of the line extension=php_mysql.dll. Then I had to change change extension_dir from extension_dir = "../" to extension_dir = "ext/". Then it started to magically work <!--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-->.
  • ComproxComprox *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
    <!--QuoteBegin-tuemmykids+May 5 2005, 03:03 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (tuemmykids @ May 5 2005, 03:03 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> All I did was remove the ; infront of the line extension=php_mysql.dll. Then I had to change change extension_dir from extension_dir = "../" to extension_dir = "ext/". Then it started to magically work <!--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-->. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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.
  • brute_forcebrute_force Join Date: 2003-10-04 Member: 21433Members, Constellation
    <!--QuoteBegin-tuemmykids+May 5 2005, 11:03 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (tuemmykids @ May 5 2005, 11:03 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> All I did was remove the ; infront of the line extension=php_mysql.dll. Then I had to change change extension_dir from extension_dir = "../" to extension_dir = "ext/". Then it started to magically work <!--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-->. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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-->
  • tuemmykidstuemmykids Join Date: 2003-09-15 Member: 20884Members
    edited May 2005
    Well, I'm not sure what's wrong by you Comprox. I've only set up PHP with MySQL once and that was on my own computer. Maybe you should ask in some PHP/MySQL forum.

    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.
  • brute_forcebrute_force Join Date: 2003-10-04 Member: 21433Members, Constellation
    <!--QuoteBegin-tuemmykids+May 5 2005, 11:58 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (tuemmykids @ May 5 2005, 11:58 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> 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. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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.
  • BryBry Join Date: 2003-01-23 Member: 12609Members
    For administrating a windows mysql server i really recommend the free mysql administrator
    <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
Sign In or Register to comment.