Skip to content

Commit 4a2553b

Browse files
authored
Merge pull request #1073 from titsuki/fix-dbiish
Fix DBIish examples
2 parents dccec0e + 6e276ed commit 4a2553b

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

doc/Language/nativecall.pod6

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -501,42 +501,20 @@ or C<CPointer>.
501501
=head1 Examples
502502
503503
Some examples can be found L<in the DBIsh repository
504-
|https://github.com/perl6/DBIish/tree/master/lib/DBDish>.
504+
|https://github.com/perl6/DBIish/tree/master/examples>.
505505
506506
=head2 MySQL
507507
508-
=comment TODO Do we really need this here? Seems like this info should just go
509-
along-side that example in the git repo, rather than replicated
510-
on p6doc.
511-
512-
There is an example of using the MySQL client library. There is a project
513-
L<https://github.com/mberends/minidbi> that wraps these functions with a DBI
514-
compatible interface. You'll need that library to hand; on Debian-esque systems
508+
You'll need to install MySQL server locally; on Debian-esque systems
515509
it can be installed with something like:
516510
517-
sudo apt-get install libmysqlclient
511+
sudo apt-get install mysql-server
518512
519513
Prepare your system along these lines before trying out the examples:
520514
521515
$ mysql -u root -p
522-
CREATE DATABASE zavolaj;
523-
CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'testpass';
524-
GRANT CREATE ON zavolaj.* TO 'testuser'@'localhost';
525-
GRANT DROP ON zavolaj.* TO 'testuser'@'localhost';
526-
GRANT INSERT ON zavolaj.* TO 'testuser'@'localhost';
527-
GRANT DELETE ON zavolaj.* TO 'testuser'@'localhost';
528-
GRANT SELECT ON zavolaj.* TO 'testuser'@'localhost';
529-
GRANT LOCK TABLES ON zavolaj.* TO 'testuser'@'localhost';
530-
GRANT SELECT ON mysql.* TO 'testuser'@'localhost';
531-
# or maybe otherwise
532-
GRANT ALL PRIVILEGES ON zavolaj.* TO 'testuser'@'localhost';
533-
534-
You can look at the results via a normal mysql connection:
535-
536-
$ mysql -utestuser -ptestpass
537-
USE zavolaj;
538-
SHOW TABLES;
539-
SELECT * FROM nom;
516+
UPDATE mysql.user SET password=password('sa') WHERE user = 'root';
517+
CREATE DATABASE test;
540518
541519
=head2 Microsoft Windows
542520

0 commit comments

Comments
 (0)