Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Feb 2004
    Posts
    12

    Thumbs down Unanswered: MySQL sucks!!! unable to do a simple thing!

    Hi

    I am purely in Microsoft Development using SQL Server for the past 4 years. Having heard so much about MySQL I gave it a try and installed the latest version MySQL 4 on Windows 2000 Server.
    I also downloaded its latest administration tool called MySQL Administrator v1.0.1a.
    Now I just have one question "HOW DO I CHANGE THE DEFAULT PORT OF MYSQL FROM 3306 TO SOMETHING ELSE???"
    This is just a simple task which can be done in seconds flawlessly in SQL Server but I am disappointed with MySQL. Can't it do a simple task properly!??
    I tried changing the port from MySQL Administrator. I changed it to 24000 and then saved all the changes/configuration. Then I restarted MySQL and it again picks up that old dam port 3306!!!!
    I changed it manually in my.ini file but it didn't work!!! then I used winMySQLAdmin that comes with MySQL and it also didn't do this!!!! (
    I posted this question on this forum and some other forums but didn't get the satisfactory response.
    Can't this so called stable database do a simple task like changing the port. Why it always picks up the old 3306 port even though I have changed it 1000 times!!!????? (

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: MySQL sucks!!! unable to do a simple thing!

    Originally posted by aliweb
    Hi

    I am purely in Microsoft Development using SQL Server for the past 4 years. Having heard so much about MySQL I gave it a try and installed the latest version MySQL 4 on Windows 2000 Server.
    I also downloaded its latest administration tool called MySQL Administrator v1.0.1a.
    Now I just have one question "HOW DO I CHANGE THE DEFAULT PORT OF MYSQL FROM 3306 TO SOMETHING ELSE???"
    This is just a simple task which can be done in seconds flawlessly in SQL Server but I am disappointed with MySQL. Can't it do a simple task properly!??
    I tried changing the port from MySQL Administrator. I changed it to 24000 and then saved all the changes/configuration. Then I restarted MySQL and it again picks up that old dam port 3306!!!!
    I changed it manually in my.ini file but it didn't work!!! then I used winMySQLAdmin that comes with MySQL and it also didn't do this!!!! (
    I posted this question on this forum and some other forums but didn't get the satisfactory response.
    Can't this so called stable database do a simple task like changing the port. Why it always picks up the old 3306 port even though I have changed it 1000 times!!!????? (
    This is not just about CLICK, CLICK, CLICK a la Micro$oft style!
    Before start working with some product read the manual properly!
    Try to change manualy in my.cnf file.

  3. #3
    Join Date
    Feb 2004
    Posts
    12

    Re: MySQL sucks!!! unable to do a simple thing!

    Originally posted by ika
    This is not just about CLICK, CLICK, CLICK a la Micro$oft style!
    Before start working with some product read the manual properly!
    Try to change manualy in my.cnf file.

    it seems u didn't read my post properly otherwise you wouldn't have said that dude!
    i have already tried 10000 times manually changing the my.ini file

  4. #4
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: MySQL sucks!!! unable to do a simple thing!

    Originally posted by aliweb
    it seems u didn't read my post properly otherwise you wouldn't have said that dude!
    i have already tried 10000 times manually changing the my.ini file
    Are you 100% sure mysql is using that config file?
    Because if the config is not exists on right place mysql is using default settings (that means also default port number).

  5. #5
    Join Date
    Feb 2004
    Posts
    12

    Cool Re: MySQL sucks!!! unable to do a simple thing!

    Originally posted by ika
    Are you 100% sure mysql is using that config file?
    Because if the config is not exists on right place mysql is using default settings (that means also default port number).
    The my.ini file is in the windows directory C:\WINNT\my.ini

  6. #6
    Join Date
    Feb 2004
    Posts
    12
    aliweb,

    dont say "MySQL sucks". the DB of Google which holds the whole web is MySQL.

    Just try to start server manually "mysqld-nt --master-port=24000" or some other port numbers you want. Fiirst shutdown the server, then go to bin folder of MySQL and try to run that statement.

    Regards,
    Peyman

  7. #7
    Join Date
    Feb 2004
    Posts
    12
    Try to run this to see all of your options

    mysqld-nt --help --verbose

  8. #8
    Join Date
    Feb 2004
    Posts
    2
    Originally posted by webgard
    aliweb,

    dont say "MySQL sucks". the DB of Google which holds the whole web is MySQL.

    Just try to start server manually "mysqld-nt --master-port=24000" or some other port numbers you want. Fiirst shutdown the server, then go to bin folder of MySQL and try to run that statement.

    Regards,
    Peyman


    default port is configured in c:\my.cnf
    this file is copy of cnf file in c:\mysql\
    choose your configuration file from my-small.cnf, my-medium.cnf or my-huge.cnf, copy it to c:\ and edit it from cmd.

  9. #9
    Join Date
    Feb 2004
    Posts
    12

    Cool

    Originally posted by webgard
    aliweb,

    dont say "MySQL sucks". the DB of Google which holds the whole web is MySQL.

    Just try to start server manually "mysqld-nt --master-port=24000" or some other port numbers you want. Fiirst shutdown the server, then go to bin folder of MySQL and try to run that statement.

    Regards,
    Peyman
    I started MySQL from the command line like you told me. It started successfully but still it runs on port 3306 not on 24000
    i tested it by running a client of MySQL and tried to connect it using port 24000 but it said MySQL is not there. then I connected using port 3306 and it worked!
    see the screenshot. in the first 2 attempts mysql was running so it gave errors. then i shutdown it from the winMySQLAdmin and then restarted on port 24000 and it didn't give any error.
    Attached Thumbnails Attached Thumbnails screenshot.jpg  

  10. #10
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137
    You really should have read the manual. --master-port deals with replication. It tells mysqld which port the master is running on. --port=24000 will change the port the local server runs on to 24000. Also, put port=24000 in your my.ini file to make it permanent. C:\WINNT\ is the right place for my.ini.

  11. #11
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482
    Originally posted by aus
    You really should have read the manual. --master-port deals with replication. It tells mysqld which port the master is running on. --port=24000 will change the port the local server runs on to 24000. Also, put port=24000 in your my.ini file to make it permanent. C:\WINNT\ is the right place for my.ini.
    And just for sure isn't there some other service which is running on port 24000?
    Try netstat -an to check if port 24000 is not occupied.

  12. #12
    Join Date
    Feb 2004
    Posts
    12
    aliweb:

    your server didn't start corretly. after mysqld-nt --master-port=24000, the command prompt should appear. but in your screenshot, i can't see the command prompt after running that command.

    Try this:
    Go to your Control Panel/Admin Tools/Services
    Shutdown MySQL Service, then Open MySQL and in Parameters section, try to insert --master-port=24000
    and start server manually.

    If no error is there, it means server will listen to 24000.

    Peyman

  13. #13
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137
    The command prompt should not appear after running mysqld-nt. That is a daemon process. It does not return control to the command prompt. Running mysqld-nt from the command prompt without explicitly putting it in the background will keep control of that shell.
    Didn't you read my previous post anyway? Using --master-port is a REPLICATION option, not the option for setting the port for the local server to accept connections on.



    The solution is to put port=24000 in the my.ini file or start with --port=24000!

  14. #14
    Join Date
    Feb 2004
    Posts
    12

    Cool

    Originally posted by aus
    The command prompt should not appear after running mysqld-nt. That is a daemon process. It does not return control to the command prompt. Running mysqld-nt from the command prompt without explicitly putting it in the background will keep control of that shell.
    Didn't you read my previous post anyway? Using --master-port is a REPLICATION option, not the option for setting the port for the local server to accept connections on.


    The solution is to put port=24000 in the my.ini file or start with --port=24000!
    thanks man it worked!!!! i used the following command like you said and it worked fine

    mysqld-nt --port=24000

    now the question arises why it is not picking up from the my.ini file which is in windows dir in C:\WINNT\my.ini ??
    what could be the problem!? any ideas!?
    my.ini has the following contents (check if syntax is wrong)

    [WinMySQLAdmin]
    Server=C:/mysql/bin/mysqld-nt.exe
    #Port number to use for connection.
    port=24000

  15. #15
    Join Date
    Oct 2003
    Location
    Denver, Colorado
    Posts
    137
    Options for MySQL Server need to be in the [mysqld] section, not [WinMySQLAdmin].

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •