Already established a connection to MySQL from PHP page thanks to Kevin Yank.
However, now wish to use "Thatware" on web server as a learning exercise.
PC in question is running RHL 7.3, Apache, MySQL 3.23.51 and PHP 4.1.2.
It seems logical to me that I need to establish a non root account in MySQL and grant privileges. Perhaps I have this wrong but is it smart to continue using a connection that calls localhost/root/password from any PHP page on the web server?
What is the correct sequence of commands at the "msql" prompt to create a new database for this use. Also, what commands are needed to create a new user account if required.
Lastly if the grey matter is still on tap, is "Thatware" a suitable candidate for my setup.
To create a new user from the mysql prompt:
show databases;
use mysql;
show tables;
select * from user;
There should be a user table. INSERT a new user with the priviliges you want.
To create a new database:
create database dbname;
use dbname;
create table tablename (
field1 varchar(16) not null primary key,
field2 ...
);
If you want this db to have the same structure as the user db, then use desc tablename to get a description of the table.
Bookmarks