SitePoint Sponsor

User Tag List

Results 1 to 19 of 19
  1. #1
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question MySQL activation problem

    I downloaded MySQL 4.1 and installed it according to the instructions from the training book. I am running W2KPeo with IIS and PHP installed.

    The book says "If you are running windows NT, 2000, XP or .NET SERVER, find a file called my-small.cnf in the directory to which you installed MySQL. Copy it to the root of your c: drive and rename it to my.cnf". It then goes on to say to remove .cnf from the registry (if I am not using SpeedDial for MS Netmeeting (which I am certainly not using)) by going to HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES.

    To install as a system service, I followed the instructions (from command prompt) and it said Service successfully installed (mysql-nt --install). This installs the service on reboot. To do it manually without rebooting, the book says to type 'net start mysql'. When I do that, I get the reply that 'MySQL service is starting'. This should be followed by ''MySQL service was started successfully', but I get an error message giving me error 1067 'The process terminated unexpectedly'.
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    you have to edit the my.cnf file to change the basedir and datadir entries to match your setup.

    alst, try typing mysqld-nt --console to force mysql to display errors. you can then stop mysql with ctrl-c

  3. #3
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    you have to edit the my.cnf file to change the basedir and datadir entries to match your setup.

    alst, try typing mysqld-nt --console to force mysql to display errors. you can then stop mysql with ctrl-c
    I did look in the file (as it was mentioned in the book), but there were no basedir and datadir entries. Here is the my.cnf content:

    # Example MySQL config file for small systems.
    #
    # This is for a system with little memory (<= 64M) where MySQL is only used
    # from time to time and it's important that the mysqld daemon
    # doesn't use much resources.
    #
    # You can copy this file to
    # /etc/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is /usr/local/var) or
    # ~/.my.cnf to set user-specific options.
    #
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.

    # The following options will be passed to all MySQL clients
    [client]
    #password = your_password
    port = 3306
    socket = /tmp/mysql.sock

    # Here follows entries for some specific programs

    # The MySQL server
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock
    skip-locking
    key_buffer = 16K
    max_allowed_packet = 1M
    table_cache = 4
    sort_buffer_size = 64K
    net_buffer_length = 2K
    thread_stack = 64K

    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (using the "enable-named-pipe" option) will render mysqld useless!
    #
    #skip-networking
    server-id = 1

    # Uncomment the following if you want to log updates
    #log-bin

    # Uncomment the following if you are NOT using BDB tables
    #skip-bdb

    # Uncomment the following if you are using InnoDB tables
    #innodb_data_home_dir = /usr/local/var/
    #innodb_data_file_path = ibdata1:10M:autoextend
    #innodb_log_group_home_dir = /usr/local/var/
    #innodb_log_arch_dir = /usr/local/var/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 16M
    #innodb_additional_mem_pool_size = 2M
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 5M
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates

    [isamchk]
    key_buffer = 8M
    sort_buffer_size = 8M

    [myisamchk]
    key_buffer = 8M
    sort_buffer_size = 8M

    [mysqlhotcopy]
    interactive-timeout
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  4. #4
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Do you have a firewall running?

  5. #5
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    add them to the mysqld section. basedir is the path to you mysql directory. datadir is the path to your mysql data directory.

  6. #6
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hartmann
    Do you have a firewall running?
    Just what came with the router
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  7. #7
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    add them to the mysqld section. basedir is the path to you mysql directory. datadir is the path to your mysql data directory.
    Ok did so but still no joy


    # Example MySQL config file for small systems.
    #
    # This is for a system with little memory (<= 64M) where MySQL is only used
    # from time to time and it's important that the mysqld daemon
    # doesn't use much resources.
    #
    # You can copy this file to
    # /etc/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is /usr/local/var) or
    # ~/.my.cnf to set user-specific options.
    #
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.

    # The following options will be passed to all MySQL clients
    [client]
    #password = your_password
    port = 3306
    socket = /tmp/mysql.sock

    # Here follows entries for some specific programs

    # The MySQL server
    [mysqld]
    port= 3306
    basedir=c:\mysqlapps\bin
    datadir=c:\mysqlapps\data

    socket= /tmp/mysql.sock
    skip-locking
    key_buffer = 16K
    max_allowed_packet = 1M
    table_cache = 4
    sort_buffer_size = 64K
    net_buffer_length = 2K
    thread_stack = 64K

    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (using the "enable-named-pipe" option) will render mysqld useless!
    #
    #skip-networking
    server-id = 1

    # Uncomment the following if you want to log updates
    #log-bin

    # Uncomment the following if you are NOT using BDB tables
    #skip-bdb

    # Uncomment the following if you are using InnoDB tables
    #innodb_data_home_dir = /usr/local/var/
    #innodb_data_file_path = ibdata1:10M:autoextend
    #innodb_log_group_home_dir = /usr/local/var/
    #innodb_log_arch_dir = /usr/local/var/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 16M
    #innodb_additional_mem_pool_size = 2M
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 5M
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates

    [isamchk]
    key_buffer = 8M
    sort_buffer_size = 8M

    [myisamchk]
    key_buffer = 8M
    sort_buffer_size = 8M

    [mysqlhotcopy]
    interactive-timeout
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  8. #8
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    what happens when you use --console?

  9. #9
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This:
    Attached Images Attached Images
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  10. #10
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    well, there's your problem. it doesn't like your mysql configuration file. rename your config file to my.txt and upload it here.

  11. #11
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    well, there's your problem. it doesn't like your mysql configuration file. rename your config file to my.txt and upload it here.
    Sorry, do you want me to show the contents? If so it is already shown on the above post. Or do you mean that I should try net start mysql with the config file changed to txt?
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  12. #12
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    no, i want you to post the actual file as an attachment. i think you have a problem with the file encoding. but you need to rename it to .txt before the BB software will allow you to upload it.

  13. #13
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok here it is
    Attached Files Attached Files
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  14. #14
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ok, your problem is line 27. all of the options are on one line. you need to make it look like this:
    Code:
    port		= 3306
    basedir=c:\mysqlapps\bin
    datadir=c:\mysqlapps\data
    socket		= /tmp/mysql.sock

  15. #15
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up



    Thanks. It now comes up with service started.




    Another noob on his way to stardom
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  16. #16
    SitePoint Member fsec's Avatar
    Join Date
    Aug 2005
    Location
    In your subconcious
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, tried it again and the error has returned. Checked all the instructions and they are ok, but getting the previous error again
    www.fsecomputing.co.uk
    www.delightfullyexotic.com

  17. #17
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    same thing using --console? anytime mysql fails to start, immediately go use the --console option to see the error message.

  18. #18
    SitePoint Evangelist
    Join Date
    Apr 2005
    Location
    Moscow, Russia
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fsec
    basedir=c:\mysqlapps\bin
    datadir=c:\mysqlapps\data
    Hi, you and the manual should be friends In mysql.ini or mysql.cnf you should use either slash ("/") or double backslash ("\\") instead of single backslash ("\") in all file paths, i.e.
    Code:
    basedir=c:/mysqlapps/bin
    datadir=c:/mysqlapps/data
    Not sure, but double quotes may be also neccessary if you you have spaces in the file path, e.g basedir="c:/Program Files/mysqlapps/bin". Check 2.3.8. Creating an Option File, 4.3.2. Using Option Files and 4.3.4. Using Options to Set Program Variables

  19. #19
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    good catch, TD!


Bookmarks

Posting Permissions

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