If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL sucks!!! unable to do a simple thing!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-23-04, 03:50
aliweb aliweb is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Thumbs down 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!!!????? (
Reply With Quote
  #2 (permalink)  
Old 02-23-04, 04:56
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: MySQL sucks!!! unable to do a simple thing!

Quote:
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.
Reply With Quote
  #3 (permalink)  
Old 02-23-04, 05:16
aliweb aliweb is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Re: MySQL sucks!!! unable to do a simple thing!

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 02-23-04, 06:10
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: MySQL sucks!!! unable to do a simple thing!

Quote:
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).
Reply With Quote
  #5 (permalink)  
Old 02-23-04, 06:19
aliweb aliweb is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Cool Re: MySQL sucks!!! unable to do a simple thing!

Quote:
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
Reply With Quote
  #6 (permalink)  
Old 02-23-04, 07:37
webgard webgard is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 02-23-04, 07:39
webgard webgard is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Try to run this to see all of your options

mysqld-nt --help --verbose
Reply With Quote
  #8 (permalink)  
Old 02-23-04, 08:12
tdob tdob is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
Quote:
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.
Reply With Quote
  #9 (permalink)  
Old 02-23-04, 08:47
aliweb aliweb is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Cool

Quote:
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 Images
File Type: jpg screenshot.jpg (46.2 KB, 538 views)
Reply With Quote
  #10 (permalink)  
Old 02-23-04, 10:18
aus aus is offline
Registered User
 
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.
Reply With Quote
  #11 (permalink)  
Old 02-23-04, 10:35
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Quote:
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.
Reply With Quote
  #12 (permalink)  
Old 02-23-04, 15:36
webgard webgard is offline
Registered User
 
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
Reply With Quote
  #13 (permalink)  
Old 02-23-04, 17:53
aus aus is offline
Registered User
 
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!
Reply With Quote
  #14 (permalink)  
Old 02-23-04, 23:38
aliweb aliweb is offline
Registered User
 
Join Date: Feb 2004
Posts: 12
Cool

Quote:
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
Reply With Quote
  #15 (permalink)  
Old 02-24-04, 00:22
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Options for MySQL Server need to be in the [mysqld] section, not [WinMySQLAdmin].
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On