Hi Ben On Saturday 08 February 2003 11:08 am, Ben Temperton wrote:
I am in need of a relational database and I noticed during the install of SuSE that MySQL had been installed. However it hasn't been added to my start applications and I've no idea how to access it or find where it's been installed as its not in my home directory either. Can any of you give me some advice as to where to find mySQL and/or how to get it running so I can create some dummy tables?
As root, in a terminal, run: rcmysql start That should start the mysql service, with a blank password. To sort that, run: mysql and it will allow you to log in without a password. Now set the password for root by running: update user set password=password("mypassword") where user="root"; This sets the password for the root user (for both localhost and hostname access) to mypassword. Then: delete from user where user=""; (that's a double quote followed by another double quote). This gets rid of the blank test user. Then run: exit to exit mysql, and run: mysqladmin -u root reload and give your password - this will reload the grant tables you just amended. Then run: mysql -uroot -p and give your root password - you should then be logged in as root. Run: show databases; to get a list of the current dbs, and: use dbname; to switch to the dbname database. Then run: show tables; to see the tables in that db, and explain tablename; to see the structure of the tablename table. Hint: don't faff around with the mysql db, or it may stop working .... After that, you need to do a bit of reading around. There are many good sites, eg Devworks, and books ("MySQL" and MySQL Cookbook" by Paul DuBois are the best). There is a Linux front-end to MySQL (MySQLcc, though in my view it's very buggy), and a PHP front-end (phpMyAdmin - the Rolls-Royce of MySQL GUIs, especially since it's available from any PC on your LAN that runs a browser; highly recommended). This should get you started. HTH Kevin