[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Automatisk fremstilling af MySQL Databaser som root i BASH



Nogen der kender et stykke kode der kan gøre dette uden yderligere interaktiv input.

Jeg har forsøgt uden held med følgende data:

++ mkpasswd qwerty
+ DBPASSWD=zs1CyM5tRJYcw
+ mysqladmin create tst98_tj_juac_dk -uroot -pzs1CyM5tRJYcw
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
+ echo 'The username of the database tst98_tj_juac_dk is root. And the
password for the database is zs1CyM5tRJYcw'

Hvordan fikser man problemet med at mysqladmin fejlmelder når den køres
som script? desuden kræver den password når den køres direkte fra
kommandoprompten

mysqladmin koden:

DBPASSWD=`mkpasswd qwerty`
mysqladmin create ${UNDERSCORENAME} -uroot -p${DBPASSWD} # MySQL root-"Password" før #? virker hverken med eller uden.
echo "The username of the database ${UNDERSCORENAME} is root. And the
      password for the database is ${DBPASSWD}" >
"${DIR}/${LNK}.database.txt"


Håber på hjælp :)

Thomas :)

 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2011-05-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *