remote access to mysql database
in / etc / mysql / my.cnf line bind-address = 127.0.0.1
comment out also in mysql mode change for users: for example
DROP TABLE IF EXISTS devs;
CREATE TABLE devs (
First_Name VARCHAR (30) NOT NULL ,
Last_Name VARCHAR (30) NOT NULL,
Age INTEGER NOT NULL,
gender CHAR NOT NULL, id INTEGER NOT NULL AUTO_INCREMENT
,
PRIMARY KEY (id)
);
INSERT INTO devs VALUES ('Bill', ' Bloggs', 25 'm', 1);
devs INSERT INTO VALUES ('Joe', 'Bloggs', 26' m ', 2);
devs INSERT INTO VALUES (' Peter ',' Parker ', 39 , 'm', 3) INSERT INTO
devs VALUES ('Candy', 'Bligg', 19 'f', 4);
devs INSERT INTO VALUES ('Amber', 'Bligg', 27 'f', 5);
devs INSERT INTO VALUES (' Peter ',' Parker ', 49,' f ', 6);
grant all on *.* to root @ '192 .168.0.3' identified by 'a';
or
INSERT INTO devs (First_Name, Last_Name, ..) values (...)
(this saves you an indication of the primary key: D
0 comments:
Post a Comment