This is a discussion on Clarification please: starting the MySQL service within the MySQL forums, part of the Database Server Software category; --> I am a couple of simple questions that the documentation just doesn't seem straight forward about : 1. On ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I am a couple of simple questions that the documentation just doesn't seem straight forward about: 1. On a Windows MySQL post-4.0 installation, does typing: C:\> mysqld-nt . . . install the service and/or start the service ? 2. Is the defaults-file (my.ini) read when the service is installed or when it is started? 3. To solve the "lost root password" problem does the method a. run mysqld-nt --init-file= . . . now replace the method b. run mysqld-nt --skip-grant-tables . . . and c. does a. work when there IS already a (forgotten) root password? (Note the Manual page 5.0/B.1.4.1 suggests that you may also have to use a --defaults-file=, but it is ambiguous if this is necessary for the --init-file run or not. It is "obviously" necessary for the subsequent main service restart.) Thanks in advance. |
| |||
| Hi, Topaz, Answers inline... Topaz wrote: > I am a couple of simple questions that the documentation just doesn't > seem straight forward about: > > 1. On a Windows MySQL post-4.0 installation, does typing: > C:\> mysqld-nt . . . > install the service and/or start the service ? > Neither. It starts it as a program. To install as a service, see http://dev.mysql.com/doc/refman/5.1/...t-service.html. > 2. Is the defaults-file (my.ini) read when the service is installed or > when it is started? > When the service is started. > 3. To solve the "lost root password" problem does the method > a. run mysqld-nt --init-file= . . . > now replace the method > b. run mysqld-nt --skip-grant-tables . . . > and > c. does a. work when there IS already a (forgotten) root password? > (Note the Manual page 5.0/B.1.4.1 suggests that you may also have to > use a --defaults-file=, but it is ambiguous if this is necessary for > the --init-file run or not. It is "obviously" necessary for the > subsequent main service restart.) > > Thanks in advance. > > No. --init-file just gives a series of SQL commands once the service is started. You must still have the correct authorization to perform the SQL statements in the file. To access MySQL when you've forgotten your root password, you must use --skip-grant-tables. The --defaults-file parameter just allows you to start MySQL with a different options file. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| |||
| Jerry, Thanks Jerry, these answers clear my head a bit. But the manual definitely implies that section B.1.4.1 http://dev.mysql.com/doc/refman/5.1/...rmissions.html is for forgotten passwords. I paste: "If you set a root password previously, but have forgotten what it was, you can set a new password. The next two sections show procedures for Windows and Unix systems, respectively." Nowhere in this procedure does is say that you have to submit the root password in order to change it. The second oddity is that they stop the service, then run mysqld -init- file. Your reply suggest that this is just running mysqld as a program, which presumeably will exit after the SQL statements in the init-file are executed. Can you shed any erudite light on this ? Topaz On 14 mei, 18:17, Jerry Stuckle <jstuck...@attglobal.net> wrote: > Hi, Topaz, > > Answers inline... > > Topaz wrote: > > I am a couple of simple questions that the documentation just doesn't > > seem straight forward about: > > > 1. On a Windows MySQL post-4.0 installation, does typing: > > C:\> mysqld-nt . . . > > install the service and/or start the service ? > > Neither. *It starts it as a program. *To install as a service, seehttp://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html. > > > 2. Is the defaults-file (my.ini) read when the service is installed or > > when it is started? > > When the service is started. > > > 3. *To solve the "lost root password" problem does the method > > a. run mysqld-nt --init-file= . . . > > now replace the method > > b. run mysqld-nt --skip-grant-tables . . . > > and > > c. does a. work when there IS already a (forgotten) root password? > > (Note the Manual page 5.0/B.1.4.1 suggests that you may also have to > > use a --defaults-file=, but it is ambiguous if this is necessary for > > the --init-file run or not. *It is "obviously" necessary for the > > subsequent main service restart.) > > > Thanks in advance. > > No. *--init-file just gives a series of SQL commands once the service is > started. *You must still have the correct authorization to perform the > SQL statements in the file. > > To access MySQL when you've forgotten your root password, you must use > --skip-grant-tables. > > The --defaults-file parameter just allows you to start MySQL with a > different options file. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== |
| ||||
| Topaz wrote: > Jerry, > Thanks Jerry, these answers clear my head a bit. > > But the manual definitely implies that section B.1.4.1 > http://dev.mysql.com/doc/refman/5.1/...rmissions.html > is for forgotten passwords. I paste: > "If you set a root password previously, but have forgotten what it > was, you can set a new password. The next two sections show procedures > for Windows and Unix systems, respectively." > Nowhere in this procedure does is say that you have to submit the root > password in order to change it. > The second oddity is that they stop the service, then run mysqld -init- > file. Your reply suggest that this is just running mysqld as a > program, which presumeably will exit after the SQL statements in the > init-file are executed. > > Can you shed any erudite light on this ? > Topaz > > > On 14 mei, 18:17, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> Hi, Topaz, >> >> Answers inline... >> >> Topaz wrote: >>> I am a couple of simple questions that the documentation just doesn't >>> seem straight forward about: >>> 1. On a Windows MySQL post-4.0 installation, does typing: >>> C:\> mysqld-nt . . . >>> install the service and/or start the service ? >> Neither. It starts it as a program. To install as a service, seehttp://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html. >> >>> 2. Is the defaults-file (my.ini) read when the service is installed or >>> when it is started? >> When the service is started. >> >>> 3. To solve the "lost root password" problem does the method >>> a. run mysqld-nt --init-file= . . . >>> now replace the method >>> b. run mysqld-nt --skip-grant-tables . . . >>> and >>> c. does a. work when there IS already a (forgotten) root password? >>> (Note the Manual page 5.0/B.1.4.1 suggests that you may also have to >>> use a --defaults-file=, but it is ambiguous if this is necessary for >>> the --init-file run or not. It is "obviously" necessary for the >>> subsequent main service restart.) >>> Thanks in advance. >> No. --init-file just gives a series of SQL commands once the service is >> started. You must still have the correct authorization to perform the >> SQL statements in the file. >> >> To access MySQL when you've forgotten your root password, you must use >> --skip-grant-tables. >> >> The --defaults-file parameter just allows you to start MySQL with a >> different options file. >> >> -- >> ================== >> Remove the "x" from my email address >> Jerry Stuckle >> JDS Computer Training Corp. >> jstuck...@attglobal.net >> ================== > > Ah, yes - my mistake. The --init-file seems to run before authorization is set up. I didn't realize that. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |